Changeset 137
- Timestamp:
- 09/24/08 07:00:33 (3 months ago)
- Files:
-
- axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/AS3DebugPlugin.java (modified) (2 diffs)
- axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/launcher/AS3LauncherDelegate.java (modified) (4 diffs)
- axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/launcher/AS3LauncherShortcut.java (modified) (2 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/AS3Plugin.java (modified) (3 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/compiler/AS3Compiler.java (modified) (2 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/autoEdit/AS3AutoEditStrategy.java (modified) (3 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/foldingUpdater/AS3FoldingUpdater.java (modified) (2 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/hoverHelper/AS3HoverHelper.java (modified) (3 diffs)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/wizards/NewAs3Wizard.java (modified) (1 diff)
- axdt/trunk/org.axdt.as3/src/org/axdt/as3/wizards/NewProjectWizard.java (modified) (3 diffs)
- axdt/trunk/org.axdt.common/src/org/axdt/common/AxdtPlugin.java (modified) (2 diffs)
- axdt/trunk/org.axdt.flex3sdk.compiler/src/org/axdt/flex3sdk/Flex3Console.java (modified) (6 diffs)
- axdt/trunk/org.axdt.flex3sdk/src/org/axdt/flex3sdk/Flex3SDKPlugin.java (modified) (3 diffs)
- axdt/trunk/org.axdt.mxml/src/org/axdt/mxml/MxmlPlugin.java (modified) (2 diffs)
- axdt/trunk/org.axdt.navigator/src/org/axdt/navigator/AxdtNavigatorPlugin.java (modified) (2 diffs)
- axdt/trunk/org.axdt.swfview/src/org/axdt/swfview/SWFViewEditor.java (modified) (1 diff)
- axdt/trunk/org.axdt.swfview/src/org/axdt/swfview/SWFViewPlugin.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/AS3DebugPlugin.java
r92 r137 6 6 import org.eclipse.core.runtime.IPath; 7 7 import org.eclipse.core.runtime.Path; 8 import org.eclipse.core.runtime.Status; 8 9 import org.eclipse.core.runtime.preferences.ConfigurationScope; 9 10 import org.eclipse.core.runtime.preferences.IScopeContext; … … 75 76 return null; 76 77 } 78 79 public void log(String msg) { 80 log(msg, null); 81 } 82 83 public void log(String msg, Exception e) { 84 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 85 } 77 86 } axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/launcher/AS3LauncherDelegate.java
r122 r137 5 5 import org.axdt.as3.compiler.AS3Compiler; 6 6 import org.axdt.as3.compiler.AS3CompilerTarget; 7 import org.axdt.as3.debug.AS3DebugPlugin; 7 8 import org.axdt.as3.debug.IAS3DebugConstants; 8 9 import org.axdt.as3.debug.preferences.AS3DebugPreferences; … … 89 90 } 90 91 } catch (Exception e) { 91 e.printStackTrace();92 AS3DebugPlugin.getDefault().log("Error compiling swf", e); 92 93 } 93 94 return new Status(IStatus.OK, "org.axdt.as3.debug", "launching is done"); … … 120 121 } 121 122 } catch (Exception e) { 122 e.printStackTrace();123 AS3DebugPlugin.getDefault().log("Error opening swf", e); 123 124 } 124 125 ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); … … 209 210 } 210 211 212 @SuppressWarnings("unchecked") 211 213 public Object getAdapter(Class adapter) { 212 214 return null; axdt/trunk/org.axdt.as3.debug/src/org/axdt/as3/debug/launcher/AS3LauncherShortcut.java
r92 r137 1 1 package org.axdt.as3.debug.launcher; 2 2 3 import org.axdt.as3.debug.AS3DebugPlugin; 3 4 import org.axdt.as3.debug.IAS3DebugConstants; 4 5 import org.axdt.launcher.AbstractLauncherShortcut; … … 46 47 return workingCopy.doSave(); 47 48 } catch (Exception e) { 48 e.printStackTrace();49 AS3DebugPlugin.getDefault().log("Error creating launch configuration", e); 49 50 } 50 51 return null; axdt/trunk/org.axdt.as3/src/org/axdt/as3/AS3Plugin.java
r120 r137 8 8 import org.eclipse.core.runtime.IPath; 9 9 import org.eclipse.core.runtime.Path; 10 import org.eclipse.core.runtime.Status; 10 11 import org.eclipse.core.runtime.preferences.ConfigurationScope; 11 12 import org.eclipse.core.runtime.preferences.IScopeContext; … … 80 81 templateStore.load(); 81 82 } catch (IOException e) { 82 e.printStackTrace();83 AS3Plugin.getDefault().log("Error loading AXDT template store", e); 83 84 } 84 85 } … … 124 125 return null; 125 126 } 127 128 public void log(String msg) { 129 log(msg, null); 130 } 131 132 public void log(String msg, Exception e) { 133 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 134 } 126 135 } axdt/trunk/org.axdt.as3/src/org/axdt/as3/compiler/AS3Compiler.java
r92 r137 48 48 return (IAxdtCompiler) c.createExecutableExtension("class"); 49 49 } catch (Exception e) { 50 e.printStackTrace();50 AS3Plugin.getDefault().log("Error creating AXDT compiler", e); 51 51 } 52 52 } … … 66 66 return getActualCompiler().compile(target, monitor); 67 67 } 68 69 68 } axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/autoEdit/AS3AutoEditStrategy.java
r119 r137 1 1 package org.axdt.as3.imp.autoEdit; 2 2 3 import org.axdt.as3.AS3Plugin; 3 4 import org.axdt.as3.preferences.AS3Preferences; 4 5 import org.axdt.util.AxdtTextHelper; … … 71 72 } 72 73 } catch (BadLocationException e) { 73 e.printStackTrace();74 AS3Plugin.getDefault().log("Error deleting closing pair", e); 74 75 } 75 76 } … … 128 129 } 129 130 } catch (BadLocationException e) { 130 e.printStackTrace();131 AS3Plugin.getDefault().log("Error scanning for closing pair", e); 131 132 } 132 133 } axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/foldingUpdater/AS3FoldingUpdater.java
r96 r137 68 68 private void makeAdjunctAnnotations(ASTNode theAST) { 69 69 IPrsStream prsStream = theAST.getLeftIToken().getPrsStream(); 70 ArrayList adjuncts = prsStream.getAdjuncts();70 ArrayList<?> adjuncts = prsStream.getAdjuncts(); 71 71 for (int i = 0; i < adjuncts.size();) { 72 72 Adjunct adjunct = (Adjunct) adjuncts.get(i); … … 78 78 } 79 79 80 public void sendVisitorToAST(HashMap newAnnotations, Listannotations, Object ast) {80 public void sendVisitorToAST(HashMap<Annotation, Position> newAnnotations, List<Annotation> annotations, Object ast) { 81 81 ASTNode theAST = (ASTNode) ast; 82 82 theAST.accept(new FoldingVisitor()); axdt/trunk/org.axdt.as3/src/org/axdt/as3/imp/hoverHelper/AS3HoverHelper.java
r92 r137 17 17 import org.eclipse.jface.text.source.ISourceViewer; 18 18 19 import org.axdt.as3.AS3Plugin; 19 20 import org.axdt.as3.imp.parser.Ast.*; 20 21 … … 70 71 fResolver = ServiceFactory.getInstance().getReferenceResolver(fLanguage); 71 72 } catch (Exception e) { 72 System.err 73 .println("Exception getting Reference Resolver service from service factory"); 74 e.printStackTrace(); 73 AS3Plugin.getDefault().log("Exception getting Reference Resolver service from service factory", e); 75 74 fResolver = null; 76 75 } … … 99 98 100 99 } catch (Exception e) { 101 System.err 102 .println("Exception getting Documentation Provider Service from service factory"); 103 e.printStackTrace(); 100 AS3Plugin.getDefault().log("Exception getting Documentation Provider Service from service factory", e); 104 101 fResolver = null; 105 102 } axdt/trunk/org.axdt.as3/src/org/axdt/as3/wizards/NewAs3Wizard.java
r98 r137 149 149 } catch (Exception e1) { 150 150 contents = "package " + packageName + "{\n\t// template error \n}"; 151 e1.printStackTrace();151 AS3Plugin.getDefault().log("Error loading template", e1); 152 152 } 153 153 return new ByteArrayInputStream(contents.getBytes()); axdt/trunk/org.axdt.as3/src/org/axdt/as3/wizards/NewProjectWizard.java
r92 r137 3 3 import java.lang.reflect.InvocationTargetException; 4 4 5 import org.axdt.as3.AS3Plugin; 5 6 import org.axdt.as3.imp.builders.AS3Nature; 6 7 import org.axdt.as3.preferences.AS3Preferences; … … 16 17 import org.eclipse.core.runtime.IPath; 17 18 import org.eclipse.core.runtime.IProgressMonitor; 18 import org.eclipse.jface.dialogs.MessageDialog;19 19 import org.eclipse.jface.operation.IRunnableWithProgress; 20 20 import org.eclipse.jface.viewers.IStructuredSelection; … … 84 84 return false; 85 85 } catch (InvocationTargetException e) { 86 Throwable realException = e.getTargetException(); 87 realException.printStackTrace(); 88 MessageDialog.openError(getShell(), "Error", realException.getMessage()); 86 AS3Plugin.getDefault().log("Error finishing axdt project creation", e); 89 87 return false; 90 88 } axdt/trunk/org.axdt.common/src/org/axdt/common/AxdtPlugin.java
r92 r137 5 5 import org.eclipse.core.runtime.FileLocator; 6 6 import org.eclipse.core.runtime.Path; 7 import org.eclipse.core.runtime.Status; 7 8 import org.eclipse.core.runtime.preferences.ConfigurationScope; 8 9 import org.eclipse.core.runtime.preferences.IScopeContext; … … 73 74 if (url != null) reg.put(AXDT_ICON, ImageDescriptor.createFromURL(url)); 74 75 } 76 77 public void log(String msg) { 78 log(msg, null); 79 } 80 81 public void log(String msg, Exception e) { 82 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 83 } 75 84 } axdt/trunk/org.axdt.flex3sdk.compiler/src/org/axdt/flex3sdk/Flex3Console.java
r104 r137 83 83 addHyperlink((IHyperlink) link[0], (Integer) link[1], (Integer) link[2]); 84 84 } catch (Exception e) { 85 e.printStackTrace();85 Flex3SDKPlugin.getDefault().log("error adding hyperlink to flex compiler console", e); 86 86 } 87 87 } … … 111 111 stream.close(); 112 112 } catch (IOException e) { 113 e.printStackTrace();113 Flex3SDKPlugin.getDefault().log("error closing flex compiler console stream", e); 114 114 } 115 115 } … … 128 128 addHyperlink(hyperlink, event.getOffset(), event.getLength()); 129 129 } catch (BadLocationException e) { 130 e.printStackTrace();130 Flex3SDKPlugin.getDefault().log("error matching error code", e); 131 131 } 132 132 } … … 143 143 144 144 public String getPattern() { 145 return "'" + rootLoc.toOSString() + "[^']*'";145 return "'" + rootLoc.toOSString().replace("\\", "\\\\") + "[^']*'"; 146 146 } 147 147 … … 152 152 if (string != null) { 153 153 String[] split = string.split(":"); 154 // do we have a sane path ? 155 if (split[0].length() == 1) { 156 // no we have a windows path 157 split = new String[] { 158 split[0] + ":" + split[1], 159 split[2], split[3] 160 }; 161 } 154 162 IPath path = new Path(split[0]); 155 163 path = path.removeFirstSegments(rootLoc.matchingFirstSegments(path)); … … 161 169 } 162 170 } catch (Exception e) { 163 e.printStackTrace();171 Flex3SDKPlugin.getDefault().log("error matching worspace path", e); 164 172 } 165 173 } axdt/trunk/org.axdt.flex3sdk/src/org/axdt/flex3sdk/Flex3SDKPlugin.java
r92 r137 7 7 import org.eclipse.core.runtime.IPath; 8 8 import org.eclipse.core.runtime.Platform; 9 import org.eclipse.core.runtime.Status; 9 10 import org.eclipse.core.runtime.preferences.ConfigurationScope; 10 11 import org.eclipse.core.runtime.preferences.IScopeContext; … … 75 76 return FileLocator.resolve(urls[0]); 76 77 } catch (IOException e) { 77 e.printStackTrace();78 getDefault().log("Error resolving flex sdk bundle url", e); 78 79 } 79 80 return null; … … 83 84 return imageDescriptorFromPlugin(PLUGIN_ID, path); 84 85 } 86 87 public void log(String msg) { 88 log(msg, null); 89 } 90 91 public void log(String msg, Exception e) { 92 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 93 } 85 94 } axdt/trunk/org.axdt.mxml/src/org/axdt/mxml/MxmlPlugin.java
r136 r137 7 7 import org.eclipse.core.runtime.Path; 8 8 import org.eclipse.core.runtime.Platform; 9 import org.eclipse.core.runtime.Status; 9 10 import org.eclipse.core.runtime.preferences.ConfigurationScope; 10 11 import org.eclipse.core.runtime.preferences.IScopeContext; … … 88 89 return FileLocator.resolve(urls[0]); 89 90 } catch (IOException e) { 90 e.printStackTrace();91 getDefault().log("error resolving bundle url", e); 91 92 } 92 93 return null; 93 94 } 95 96 public void log(String msg) { 97 log(msg, null); 98 } 99 100 public void log(String msg, Exception e) { 101 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 102 } 94 103 } axdt/trunk/org.axdt.navigator/src/org/axdt/navigator/AxdtNavigatorPlugin.java
r92 r137 1 1 package org.axdt.navigator; 2 2 3 import org.eclipse.core.runtime.Status; 3 4 import org.eclipse.core.runtime.preferences.ConfigurationScope; 4 5 import org.eclipse.core.runtime.preferences.IScopeContext; … … 65 66 return imageDescriptorFromPlugin(PLUGIN_ID, path); 66 67 } 68 69 public void log(String msg) { 70 log(msg, null); 71 } 72 73 public void log(String msg, Exception e) { 74 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 75 } 67 76 } axdt/trunk/org.axdt.swfview/src/org/axdt/swfview/SWFViewEditor.java
r103 r137 103 103 }); 104 104 } catch (Exception e) { 105 // TODO: handle exception 106 e.printStackTrace(); 105 SWFViewPlugin.getDefault().log("error handling resource change", e); 107 106 } 108 107 } axdt/trunk/org.axdt.swfview/src/org/axdt/swfview/SWFViewPlugin.java
r92 r137 1 1 package org.axdt.swfview; 2 2 3 import org.eclipse.core.runtime.Status; 3 4 import org.eclipse.core.runtime.preferences.ConfigurationScope; 4 5 import org.eclipse.core.runtime.preferences.IScopeContext; … … 65 66 return imageDescriptorFromPlugin(PLUGIN_ID, path); 66 67 } 68 69 public void log(String msg) { 70 log(msg, null); 71 } 72 73 public void log(String msg, Exception e) { 74 getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, msg, e)); 75 } 67 76 }
