Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 102054 Details for
Bug 162558
[bridge] C/C++ via CDT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch 1 for Mylyn 3.0 change to status message handling
cdt.mylyn.ui-3.0.patch1 (text/plain), 13.88 KB, created by
Jeff Johnston
on 2008-05-26 17:38:05 EDT
(
hide
)
Description:
Patch 1 for Mylyn 3.0 change to status message handling
Filename:
MIME Type:
Creator:
Jeff Johnston
Created:
2008-05-26 17:38:05 EDT
Size:
13.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.mylyn.ui >Index: src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java,v >retrieving revision 1.1 >diff -u -r1.1 CDTStructureBridge.java >--- src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java 26 May 2008 21:28:50 -0000 >@@ -25,11 +25,11 @@ > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.context.core.AbstractContextStructureBridge; >-import org.eclipse.mylyn.context.core.ContextCorePlugin; > import org.eclipse.mylyn.context.core.IInteractionElement; >+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin; > import org.eclipse.mylyn.internal.resources.ui.ResourceStructureBridge; >-import org.eclipse.mylyn.monitor.core.StatusHandler; > import org.eclipse.ui.internal.WorkingSet; > import org.eclipse.ui.views.markers.internal.ConcreteMarker; > >@@ -100,8 +100,6 @@ > return childHandles; > } catch (CModelException e) { > // ignore these, usually indicate no-existent element >- } catch (Exception e) { >- StatusHandler.fail(e, CDTUIBridgePlugin.getResourceString("MylynCDT.childAccessFailed"), false); // $NON-NLS-1$ > } > } > } >@@ -109,52 +107,7 @@ > } > > public static ICElement getElementForHandle(String handle) { >-// System.out.println("[handle is " + handle); >-// ICElement s = null; >-// >-// s = CoreModel.create(handle); >-// if (s == null) >-// System.out.println("[null handle is " + handle); >-// else >-// System.out.println("[element is " + s.getElementName()); >-// >-// return s; > return CoreModel.create(handle); >-// try { >-// String[] s = handle.split("\\|"); // $NON-NLS-1$ >-// if (s.length < 1) >-// return null; >-// int kind = Integer.valueOf(s[0]); >-// switch (kind) { >-// case ICElement.C_PROJECT: { >-// return CoreModel.getDefault().getCModel().getCProject(s[1]); >-// } >-// case ICElement.C_CCONTAINER: { >-// ICProject cproject = CoreModel.getDefault().getCModel().getCProject(s[1]); >-// return cproject.findElement(new Path(s[3])); >-// } >-// case C_SOURCEROOT: { >-// ICProject cproject = CoreModel.getDefault().getCModel().getCProject(s[1]); >-// return cproject.findSourceRoot(new Path(s[3])); >-// } >-// case ICElement.C_MODEL: { >-// return CoreModel.getDefault().getCModel(); >-// } >-// case ICElement.C_UNIT: { >-// IPath path = new Path(s[3]); >-// ICElement element = CoreModel.getDefault().create(path); >-// return (ITranslationUnit)element; >-// } >-// } >-// >-// // Otherwise, find the element by name within the TranslationUnit >-// IPath path = new Path(s[3]); >-// ICElement element = CoreModel.getDefault().create(path); >-// return ((ITranslationUnit)element).getElement(s[2]); >-// } catch (CModelException e) { >-// StatusHandler.log(CDTUIBridgePlugin.getFormattedString("MylynCDT.log.noObjectForHandle", new String[]{handle}), null); // $NON-NLS-1$ >-// return null; >-// } > } > > >@@ -170,39 +123,7 @@ > // The element name (optional) allows us to find an element within the > // TranslationUnit. > public static String getHandleForElement(ICElement element) { >-// System.out.println("element is " + element.getClass().getName()); >-// System.out.println("handle is " + element.getHandleIdentifier()); > return element.getHandleIdentifier(); >-// IPath path = element.getUnderlyingResource().getRawLocation(); >-// int elementType = element.getElementType(); >-// switch (elementType) { >-// case ICElement.C_PROJECT: >-// return ICElement.C_PROJECT + "|" + element.getCProject().getElementName() + "||"; // $NON-NLS-1$ // $NON-NLS-2$ >-// case ICElement.C_UNIT: >-// // FIXME: don't need project (external files won't have project >-// return ICElement.C_UNIT + "|" + element.getCProject().getElementName() + "||" + path.toPortableString(); // $NON-NLS-1$ // $NON-NLS-2$ >-// case ICElement.C_MODEL: >-// return ICElement.C_MODEL + "|"; // $NON-NLS-1$ >-// case ICElement.C_CCONTAINER: { >-// if (element instanceof ISourceRoot) { >-// // Special case of CContainer. A SourceRoot doesn't have a path set. >-// ISourceRoot root = (ISourceRoot)element; >-// path = element.getPath(); >-// return Integer.toString(C_SOURCEROOT) + "|" + element.getCProject().getElementName() + "||" + path.toPortableString(); // $NON-NLS-1$ // $NON-NLS-2$ >-// } >-// return ICElement.C_CCONTAINER + "|" + element.getCProject().getElementName() + "||" + path.toPortableString(); // $NON-NLS-1$ // $NON-NLS-2$ >-// } >-// case ICElement.C_BINARY: >-// case ICElement.C_ARCHIVE: >-// case ICElement.C_VCONTAINER: >-// case ICElement.C_UNKNOWN_DECLARATION: >-// // FIXME: For now, don't handle these >-// return null; >-// default: >-// // We default all other elements as children of the TranslationUnit >-// return Integer.toString(0) + "|" + element.getCProject().getElementName() + "|" + element.getElementName() // $NON-NLS-1$ // $NON-NLS-2$ >-// + "|" + path.toPortableString(); // $NON-NLS-1$ >-// } > } > > /** >@@ -328,10 +249,7 @@ > } > } catch (CModelException ex) { > if (ex.doesNotExist()) >- StatusHandler.fail(ex, ex.getLocalizedMessage(), false); >- return null; >- } catch (Throwable t) { >- StatusHandler.fail(t, CDTUIBridgePlugin.getFormattedString("MylynCDT.cantFindElement", new String[]{marker.toString()}), false); // $NON-NLS-1$ >+ StatusHandler.fail(ex.getStatus()); > return null; > } > } >Index: src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java,v >retrieving revision 1.1 >diff -u -r1.1 CDTUiBridge.java >--- src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java 26 May 2008 21:28:50 -0000 >@@ -22,12 +22,14 @@ > import org.eclipse.cdt.internal.ui.editor.CContentOutlinePage; > import org.eclipse.cdt.internal.ui.editor.CEditor; > import org.eclipse.cdt.internal.ui.util.EditorUtility; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; > import org.eclipse.jface.text.TextSelection; > import org.eclipse.jface.viewers.TreeViewer; >-import org.eclipse.mylyn.context.core.ContextCorePlugin; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.context.core.IInteractionElement; > import org.eclipse.mylyn.context.ui.AbstractContextUiBridge; >-import org.eclipse.mylyn.monitor.core.StatusHandler; >+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin; > import org.eclipse.ui.IEditorInput; > import org.eclipse.ui.IEditorPart; > import org.eclipse.ui.IEditorReference; >@@ -49,7 +51,8 @@ > cOutlineField = AbstractCModelOutlinePage.class.getDeclaredField("fTreeViewer"); > cOutlineField.setAccessible(true); > } catch (Exception e) { >- StatusHandler.fail(e, CDTUIBridgePlugin.getResourceString("MylynCDT.outlineViewerFailure"), true); // $NON-NLS-1$ >+ StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getResourceString("MylynCDT.outlineViewerFailure"), e)); // $NON-NLS-1$ > } > } > >@@ -61,7 +64,9 @@ > return; > IEditorPart part = EditorUtility.openInEditor(cElement); > } catch (Throwable t) { >- StatusHandler.fail(t, CDTUIBridgePlugin.getFormattedString("MylynCDT.openEditorFailure", new String[]{node.toString()}), true); // $NON-NLS-1$ >+ StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getFormattedString("MylynCDT.openEditorFailure", // $NON-NLS-1$ >+ new String[]{node.getHandleIdentifier()}), t)); > } > } > >@@ -87,7 +92,8 @@ > } > } > } catch (Throwable t) { >- StatusHandler.fail(t, CDTUIBridgePlugin.getResourceString("MylynCDT.autoCloseEditorFailure"), false); // $NON-NLS-1$ >+ StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getResourceString("MylynCDT.autoCloseEditorFailure"), t)); // $NON-NLS-1$ > } > } > >@@ -121,7 +127,8 @@ > try { > viewers.add((TreeViewer) cOutlineField.get(page)); > } catch (Exception e) { >- StatusHandler.log(e, CDTUIBridgePlugin.getResourceString("MylynCDT.log.getOutlineViewerFailure")); // $NON-NLS-1$ >+ StatusHandler.log(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getResourceString("MylynCDT.log.getOutlineViewerFailure"), e)); // $NON-NLS-1$ > } > } > } >Index: src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java,v >retrieving revision 1.1 >diff -u -r1.1 CDTUiUtil.java >--- src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java 26 May 2008 21:28:50 -0000 >@@ -24,9 +24,11 @@ > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.resource.ImageDescriptor; >-import org.eclipse.mylyn.monitor.core.StatusHandler; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.swt.graphics.Point; > import org.eclipse.ui.views.markers.internal.ConcreteMarker; > >@@ -112,7 +114,8 @@ > CDTUIBridgePlugin.getResourceString("MylynCDT.findCElementFailure")); //$NON-NLS-1$ > return null; > } catch (Throwable t) { >- StatusHandler.fail(t, CDTUIBridgePlugin.getFormattedString("MylynCDT.findElementFailure", new String[]{marker.toString()}), false); // $NON-NLS-1$ >+ StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getFormattedString("MylynCDT.findElementFailure", new String[]{marker.toString()}), t)); // $NON-NLS-1$ > return null; > } > } >Index: src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java,v >retrieving revision 1.1 >diff -u -r1.1 InterestInducingProblemListener.java >--- src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java 26 May 2008 21:28:50 -0000 >@@ -13,11 +13,13 @@ > import org.eclipse.cdt.ui.CUIPlugin; > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IResource; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; > import org.eclipse.jface.util.IPropertyChangeListener; > import org.eclipse.jface.util.PropertyChangeEvent; >-import org.eclipse.mylyn.context.core.ContextCorePlugin; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.context.core.IInteractionElement; >-import org.eclipse.mylyn.monitor.core.StatusHandler; >+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin; > > /** > * @author Mik Kersten >@@ -54,7 +56,8 @@ > } > } > } catch (Exception e) { >- StatusHandler.log(e, CDTUIBridgePlugin.getResourceString("MylynCDT.updateMarkerFailure")); // $NON-NLS-1$ >+ StatusHandler.log(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getResourceString("MylynCDT.updateMarkerFailure"), e)); // $NON-NLS-1$ > } > } > >Index: src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java,v >retrieving revision 1.1 >diff -u -r1.1 InterestUpdateDeltaListener.java >--- src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java 21 Apr 2008 16:40:17 -0000 1.1 >+++ src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java 26 May 2008 21:28:50 -0000 >@@ -13,9 +13,11 @@ > import org.eclipse.cdt.core.model.ICElementDelta; > import org.eclipse.cdt.core.model.IElementChangedListener; > import org.eclipse.cdt.core.model.ITranslationUnit; >-import org.eclipse.mylyn.context.core.ContextCorePlugin; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.context.core.IInteractionElement; >-import org.eclipse.mylyn.monitor.core.StatusHandler; >+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin; > import org.eclipse.ui.IWorkbench; > import org.eclipse.ui.PlatformUI; > >@@ -76,7 +78,8 @@ > } > } > } catch (Throwable t) { >- StatusHandler.fail(t, CDTUIBridgePlugin.getResourceString("MylynCDT.deltaUpdateFailure"), false); // $NON-NLS-1$ >+ StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, >+ CDTUIBridgePlugin.getResourceString("MylynCDT.deltaUpdateFailure"), t)); // $NON-NLS-1$ > } > } > >@@ -97,13 +100,13 @@ > > private void delete(final IInteractionElement element) { > if (!asyncExecMode) { >- ContextCorePlugin.getContextManager().delete(element); >+ ContextCorePlugin.getContextManager().deleteElement(element); > } else { > IWorkbench workbench = PlatformUI.getWorkbench(); > if (workbench != null) { > workbench.getDisplay().asyncExec(new Runnable() { > public void run() { >- ContextCorePlugin.getContextManager().delete(element); >+ ContextCorePlugin.getContextManager().deleteElement(element); > } > }); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 162558
:
63562
|
87836
|
91683
|
91692
|
92233
|
92367
|
92508
|
92752
|
95302
|
95303
| 102054 |
102056
|
102057
|
102058
|
102060
|
102339