Changeset 56
- Timestamp:
- 01/25/10 12:55:18 (15 years ago)
- Location:
- java/FramclipsePlugin
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
java/FramclipsePlugin/META-INF/MANIFEST.MF
r13 r56 13 13 org.eclipse.ui.workbench.texteditor, 14 14 org.eclipse.ui.views, 15 org.eclipse.ui.ide 15 org.eclipse.ui.ide, 16 org.eclipse.core.resources 16 17 Eclipse-LazyStart: true 17 18 Export-Package: -
java/FramclipsePlugin/src/main/java/com/framsticks/framclipse/editors/configuration/FramclipseReconcilingStrategy.java
r13 r56 7 7 import java.util.List; 8 8 9 import org.eclipse.core.resources.IMarker; 10 import org.eclipse.core.resources.IResource; 11 import org.eclipse.core.runtime.CoreException; 9 12 import org.eclipse.core.runtime.IPath; 10 13 import org.eclipse.core.runtime.IProgressMonitor; … … 22 25 import org.eclipse.ui.IPathEditorInput; 23 26 import org.eclipse.ui.IURIEditorInput; 27 import org.eclipse.ui.ide.ResourceUtil; 24 28 25 29 import com.framsticks.framclipse.editors.FramclipseEditor; … … 33 37 import com.framsticks.framclipse.internal.parser.FramclipseParser; 34 38 import com.framsticks.framclipse.internal.parser.Node; 39 import com.framsticks.framclipse.internal.parser.ParseException; 40 import com.framsticks.framclipse.internal.parser.TokenMgrError; 35 41 36 42 … … 89 95 viewer.setRedraw(false); 90 96 91 parseDocument(); 97 IResource resource = ResourceUtil.getResource(fEditor.getEditorInput()); 98 resource.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ZERO); 99 100 try { 101 parseDocument(); 102 } catch (ParseException e) { 103 ErrorHandler<ParseException> handler = new ErrorHandler.ParseErrorHandler(); 104 handler.createMarker(resource, e); 105 } catch (TokenMgrError e) { 106 ErrorHandler<TokenMgrError> handler = new ErrorHandler.TokenErrorHandler(); 107 handler.createMarker(resource, e); 108 } 92 109 fEditor.updateOutlinePage(); 93 110 94 111 collectAndUpdateAnnotations(); 112 } catch (CoreException e) { 113 e.printStackTrace(); 95 114 } 96 115 finally … … 105 124 } 106 125 107 void parseDocument() 126 void parseDocument() throws ParseException 108 127 { 109 128 -
java/FramclipsePlugin/src/main/java/com/framsticks/framclipse/editors/hover/FramscriptTextHover.java
r13 r56 5 5 import org.eclipse.jface.internal.text.html.BrowserInformationControl; 6 6 import org.eclipse.jface.internal.text.html.HTMLTextPresenter; 7 import org.eclipse.jface.resource.JFaceResources; 7 8 import org.eclipse.jface.text.AbstractReusableInformationControlCreator; 8 9 import org.eclipse.jface.text.BadLocationException; … … 35 36 36 37 public IInformationControl doCreateInformationControl(Shell parent) { 37 int shellStyle= SWT.RESIZE | SWT.TOOL; 38 int style= SWT.V_SCROLL | SWT.H_SCROLL; 39 if (BrowserInformationControl.isAvailable(parent)) 40 return new BrowserInformationControl(parent, shellStyle, style); 41 else 42 return new DefaultInformationControl(parent, shellStyle, style, new HTMLTextPresenter(false)); 38 // int shellStyle= SWT.RESIZE | SWT.TOOL; 39 // int style= SWT.V_SCROLL | SWT.H_SCROLL; 40 // if (BrowserInformationControl.isAvailable(parent)) { 41 // return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, true); 42 // return new BrowserInformationControl(parent, shellStyle, style); 43 // } else 44 // return new DefaultInformationControl(parent, shellStyle, style, new HTMLTextPresenter(false)); 45 return new DefaultInformationControl(parent, true); 43 46 } 44 47 } … … 47 50 48 51 public IInformationControl doCreateInformationControl(Shell parent) { 49 if (BrowserInformationControl.isAvailable(parent)) 50 return new BrowserInformationControl(parent, SWT.TOOL | SWT.NO_TRIM, SWT.NONE, EditorsUI.getTooltipAffordanceString()); 51 else 52 return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true), EditorsUI.getTooltipAffordanceString()); 52 // if (BrowserInformationControl.isAvailable(parent)) { 53 // return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, true); 54 // return new BrowserInformationControl(parent, SWT.TOOL | SWT.NO_TRIM, SWT.NONE, EditorsUI.getTooltipAffordanceString()); 55 // } else { 56 // return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true), EditorsUI.getTooltipAffordanceString()); 57 return new DefaultInformationControl(parent, true); 58 // } 53 59 } 54 60 -
java/FramclipsePlugin/src/main/java/com/framsticks/framclipse/internal/parser/FramclipseParser.java
r13 r56 26 26 } 27 27 28 public Node parse(String content, EditorType editorType, URL url) {28 public Node parse(String content, EditorType editorType, URL url) throws ParseException { 29 29 if (editorType.equals(EditorType.FRAMSCRIPT)) { 30 30 … … 66 66 } 67 67 recursiveSetOffset(inc, inc.getBeginOffset(), inc.getEndOffset()); 68 } catch ( Throwablee) {68 } catch (ParseException e) { 69 69 inc.setValid(false); 70 70 System.err.println("In "+path+fname); … … 75 75 } 76 76 return model; 77 } catch (ParseException e) { 78 e.printStackTrace(); 79 throw e; 80 } catch (TokenMgrError e) { 81 e.printStackTrace(); 82 throw e; 77 83 } catch (Exception e) { 78 84 e.printStackTrace(); 79 } catch (TokenMgrError err) {80 err.printStackTrace();81 85 } 82 86 }
Note: See TracChangeset
for help on using the changeset viewer.