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 161171 Details for
Bug 228022
[CommonNavigator] Allow content providers to explicitly specify their ordering
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch of incomplete current work
clipboard.txt (text/plain), 7.46 KB, created by
Francis Upton IV
on 2010-03-05 14:25:30 EST
(
hide
)
Description:
Patch of incomplete current work
Filename:
MIME Type:
Creator:
Francis Upton IV
Created:
2010-03-05 14:25:30 EST
Size:
7.46 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.navigator >Index: schema/navigatorContent.exsd >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.navigator/schema/navigatorContent.exsd,v >retrieving revision 1.46 >diff -u -r1.46 navigatorContent.exsd >--- schema/navigatorContent.exsd 12 Sep 2009 06:36:47 -0000 1.46 >+++ schema/navigatorContent.exsd 5 Mar 2010 19:24:35 -0000 >@@ -134,6 +134,16 @@ > </restriction> > </simpleType> > </attribute> >+ <attribute name="appearsBefore" type="string"> >+ <annotation> >+ <documentation> >+ Specifies the ID of the navigator content that this navigator content appears before. This navigator content will be processed before the specified navigator content is processed. >+ </documentation> >+ <appInfo> >+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.navigator.navigatorContent/@id"/> >+ </appInfo> >+ </annotation> >+ </attribute> > <attribute name="contentProvider" type="string"> > <annotation> > <documentation> >Index: src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java,v >retrieving revision 1.22 >diff -u -r1.22 NavigatorContentDescriptor.java >--- src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java 20 Jan 2010 00:01:31 -0000 1.22 >+++ src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java 5 Mar 2010 19:24:35 -0000 >@@ -63,6 +63,8 @@ > > private int priority = Priority.NORMAL_PRIORITY_VALUE; > >+ private String appearsBeforeId; >+ > private Expression enablement; > > private Expression possibleChildren; >@@ -135,6 +137,16 @@ > } > > /** >+ * FIXME this should be exposed through the API, but it went in after the API freeze. >+ * >+ * @return The value specified by the <i>appearsBefore</i> attribute of the >+ * <navigatorContent/> element. >+ */ >+ public String getAppearsBeforeId() { >+ return appearsBeforeId; >+ } >+ >+ /** > * Parses the configuration element. > * > * @throws WorkbenchException >@@ -163,6 +175,7 @@ > providesSaveables = (providesSaveablesString != null && providesSaveablesString > .length() > 0) ? Boolean.valueOf(providesSaveablesString) > .booleanValue() : false; >+ appearsBeforeId = configElement.getAttribute(ATT_APPEARS_BEFORE); > > if (priorityString != null) { > try { >#P org.eclipse.ui.tests.navigator >Index: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider.java >=================================================================== >RCS file: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider.java >diff -N src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,77 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Oakland Software Incorporated and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Francis Upton IV, Oakland Software - initial API and implementation >+ ******************************************************************************/ >+package org.eclipse.ui.tests.navigator.extension; >+ >+import java.util.ArrayList; >+import java.util.List; >+ >+import org.eclipse.core.resources.IResource; >+import org.eclipse.jface.viewers.ITreeContentProvider; >+import org.eclipse.jface.viewers.Viewer; >+ >+/** >+ * Provides some children for a given resource. >+ */ >+public class TestSimpleChildrenContentProvider implements ITreeContentProvider { >+ >+ public String _name; >+ >+ private Object[] _children; >+ >+ public class SimpleChild { >+ public String _name; >+ public IResource _parent; >+ >+ public String toString() { >+ return _name; >+ } >+ } >+ >+ public TestSimpleChildrenContentProvider() { >+ } >+ >+ public Object[] getElements(Object inputElement) { >+ return getChildren(inputElement); >+ } >+ >+ public Object[] getChildren(Object parentElement) { >+ if (parentElement instanceof IResource) { >+ if (_children == null) { >+ List l = new ArrayList(); >+ for (int i = 0; i < 4; i++) { >+ SimpleChild child = new SimpleChild(); >+ child._parent = (IResource) parentElement; >+ child._name = _name + i; >+ l.add(child); >+ } >+ _children = l.toArray(); >+ } >+ return _children; >+ } >+ throw new RuntimeException("Can only be called as a child of a resource"); >+ } >+ >+ public Object getParent(Object element) { >+ SimpleChild child = (SimpleChild) element; >+ return child._parent; >+ } >+ >+ public boolean hasChildren(Object element) { >+ return true; >+ } >+ >+ public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) { >+ _children = null; >+ } >+ >+ public void dispose() { >+ } >+} >Index: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider1.java >=================================================================== >RCS file: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider1.java >diff -N src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider1.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider1.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.ui.tests.navigator.extension; >+ >+public class TestSimpleChildrenContentProvider1 extends TestSimpleChildrenContentProvider { >+ >+ public TestSimpleChildrenContentProvider1() { >+ _name = "1"; >+ } >+ >+} >Index: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider2.java >=================================================================== >RCS file: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider2.java >diff -N src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider2.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider2.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.ui.tests.navigator.extension; >+ >+public class TestSimpleChildrenContentProvider2 extends TestSimpleChildrenContentProvider { >+ >+ public TestSimpleChildrenContentProvider2() { >+ _name = "2"; >+ } >+ >+} >Index: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider3.java >=================================================================== >RCS file: src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider3.java >diff -N src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider3.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ui/tests/navigator/extension/TestSimpleChildrenContentProvider3.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,9 @@ >+package org.eclipse.ui.tests.navigator.extension; >+ >+public class TestSimpleChildrenContentProvider3 extends TestSimpleChildrenContentProvider { >+ >+ public TestSimpleChildrenContentProvider3() { >+ _name = "3"; >+ } >+ >+}
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
Actions:
View
|
Diff
Attachments on
bug 228022
:
105827
|
133258
|
161171
|
161238