Changeset 3372 for devel-tools/trunk
- Timestamp:
- Feb 5, 2008, 9:21:49 AM (13 years ago)
- Location:
- devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpEditor.java
r3365 r3372 108 108 109 109 public void selectionChanged (SelectionChangedEvent event) { 110 if (rfpReconcilingStrategy == null) 111 return; 112 AstImplem astImplem = rfpReconcilingStrategy.getAstImplem(); 110 113 if (astImplem == null) 111 114 return; … … 127 130 annotations.clear(); 128 131 for (AstNode astNode : astNodeList) { 132 if (!astImplem.pos.rfpResource.equals(astNode.pos.rfpResource)) 133 continue; 129 134 Annotation annotation = new Annotation("org.eclipse.jdt.ui.occurrences", false, astNode.toString()); 130 135 annotations.add(annotation); … … 141 146 private RfpSourceViewerConfiguration rfpSourceViewerConfiguration; 142 147 143 AstImplem astImplem= null;148 RfpReconcilingStrategy rfpReconcilingStrategy = null; 144 149 145 150 public RfpEditor () { … … 201 206 } 202 207 }); 203 // Runnable runnable = new Runnable() {204 // 205 // 206 // 207 // };208 // if (runnable == null)209 // 210 // IWorkbenchPartSite site = this.getSite();211 // if (site == null)212 // 213 // Shell shell = site.getShell();214 // if (shell == null || shell.isDisposed())215 // 216 // Display display = shell.getDisplay();217 // if (display == null || display.isDisposed())218 // 219 // display.asyncExec(runnable);208 // Runnable runnable = new Runnable() { 209 // public void run () { 210 // getSourceViewer().invalidateTextPresentation(); 211 // } 212 // }; 213 // if (runnable == null) 214 // return; 215 // IWorkbenchPartSite site = this.getSite(); 216 // if (site == null) 217 // return; 218 // Shell shell = site.getShell(); 219 // if (shell == null || shell.isDisposed()) 220 // return; 221 // Display display = shell.getDisplay(); 222 // if (display == null || display.isDisposed()) 223 // return; 224 // display.asyncExec(runnable); 220 225 } 221 226 -
devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpReconcilingStrategy.java
r3365 r3372 18 18 this.editor = editor; 19 19 this.store = store; 20 editor.rfpReconcilingStrategy = this; 21 } 22 23 public AstImplem getAstImplem () { 24 IFile file = (IFile) editor.getEditorInput().getAdapter(IFile.class); 25 if (document == null || document.get().equals("")) 26 return null; 27 return RfpBuilder.checkAndCompileModuleImplem(file.getProject(), file, document.get()); 20 28 } 21 29 22 30 public void reconcile (IRegion partition) { 23 IFile file = (IFile) editor.getEditorInput().getAdapter(IFile.class); 24 if (document == null || document.get().equals("")) 25 return; 26 AstImplem astImplem = RfpBuilder.checkAndCompileModuleImplem(file.getProject(), file, document.get()); 27 this.editor.astImplem = astImplem; 31 AstImplem astImplem = getAstImplem(); 28 32 if (astImplem != null) 29 33 editor.changeTextPresentation(document, PresentationVisitor.updateTextPresentation(astImplem, store));
Note: See TracChangeset
for help on using the changeset viewer.