equal
deleted
inserted
replaced
261 if blockname == "": |
261 if blockname == "": |
262 dialog = wx.TextEntryDialog(self.ParentWindow, _("Block name"), _("Please enter a block name"), "", wx.OK|wx.CANCEL|wx.CENTRE) |
262 dialog = wx.TextEntryDialog(self.ParentWindow, _("Block name"), _("Please enter a block name"), "", wx.OK|wx.CANCEL|wx.CENTRE) |
263 if dialog.ShowModal() == wx.ID_OK: |
263 if dialog.ShowModal() == wx.ID_OK: |
264 blockname = dialog.GetValue() |
264 blockname = dialog.GetValue() |
265 else: |
265 else: |
266 event.SetDragText("") |
266 event.SetDragText("") |
267 return |
267 return |
268 dialog.Destroy() |
268 dialog.Destroy() |
269 if blockname.upper() in [name.upper() for name in self.Controler.GetProjectPouNames(self.Debug)]: |
269 if blockname.upper() in [name.upper() for name in self.Controler.GetProjectPouNames(self.Debug)]: |
270 message = _("\"%s\" pou already exists!")%blockname |
270 message = _("\"%s\" pou already exists!")%blockname |
271 elif blockname.upper() in [name.upper() for name in self.Controler.GetEditedElementVariables(self.TagName, self.Debug)]: |
271 elif blockname.upper() in [name.upper() for name in self.Controler.GetEditedElementVariables(self.TagName, self.Debug)]: |
630 last_styled_pos = current_pos + 1 |
630 last_styled_pos = current_pos + 1 |
631 state = SPACE |
631 state = SPACE |
632 if len(self.CallStack) > 0: |
632 if len(self.CallStack) > 0: |
633 current_call = self.CallStack.pop() |
633 current_call = self.CallStack.pop() |
634 else: |
634 else: |
635 current_call = None |
635 current_call = None |
636 elif state == PRAGMA: |
636 elif state == PRAGMA: |
637 if line.endswith("}"): |
637 if line.endswith("}"): |
638 self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) |
638 self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) |
639 last_styled_pos = current_pos |
639 last_styled_pos = current_pos |
640 state = SPACE |
640 state = SPACE |
959 if highlight_start_pos < end_pos and highlight_end_pos > start_pos: |
959 if highlight_start_pos < end_pos and highlight_end_pos > start_pos: |
960 self.StartStyling(highlight_start_pos, 0xff) |
960 self.StartStyling(highlight_start_pos, 0xff) |
961 self.SetStyling(highlight_end_pos - highlight_start_pos, highlight_type) |
961 self.SetStyling(highlight_end_pos - highlight_start_pos, highlight_type) |
962 self.StartStyling(highlight_start_pos, 0x00) |
962 self.StartStyling(highlight_start_pos, 0x00) |
963 self.SetStyling(len(self.Editor.GetText()) - highlight_end_pos, wx.stc.STC_STYLE_DEFAULT) |
963 self.SetStyling(len(self.Editor.GetText()) - highlight_end_pos, wx.stc.STC_STYLE_DEFAULT) |
964 |
|