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 125501 Details for
Bug 264653
[JSDT Bridge] [API] Enable the connector for other JavaScript support
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 for sse
org.eclipse.wst.sse.ui.patch (text/plain), 4.44 KB, created by
Roy Ganor
on 2009-02-12 04:47:37 EST
(
hide
)
Description:
patch for sse
Filename:
MIME Type:
Creator:
Roy Ganor
Created:
2009-02-12 04:47:37 EST
Size:
4.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.sse.ui >Index: schema/editorconfiguration.exsd >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd,v >retrieving revision 1.7 >diff -u -r1.7 editorconfiguration.exsd >--- schema/editorconfiguration.exsd 9 Aug 2008 19:17:14 -0000 1.7 >+++ schema/editorconfiguration.exsd 8 Feb 2009 15:13:05 -0000 >@@ -69,6 +69,15 @@ > </appinfo> > </annotation> > </attribute> >+ <attribute name="priority" type="decimal" default="0"> >+ <annotation> >+ <documentation> >+ Decimal value defining the priority of the given extension implementation. >+ Extension with the highest priority value will be used. Default priority value is 0. >+ No special order among several extensions with the same priority value should be expected. >+ </documentation> >+ </annotation> >+ </attribute> > </complexType> > </element> > >@@ -216,6 +225,15 @@ > </appinfo> > </annotation> > </attribute> >+ <attribute name="priority" type="decimal" default="0"> >+ <annotation> >+ <documentation> >+ Decimal value defining the priority of the given extension implementation. >+ Extension with the highest priority value will be used. Default priority value is 0. >+ No special order among several extensions with the same priority value should be expected. >+ </documentation> >+ </annotation> >+ </attribute> > </complexType> > </element> > >Index: src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java,v >retrieving revision 1.6 >diff -u -r1.6 ExtendedConfigurationBuilder.java >--- src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java 5 Nov 2007 22:20:31 -0000 1.6 >+++ src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java 8 Feb 2009 15:13:05 -0000 >@@ -14,6 +14,7 @@ > > import java.util.ArrayList; > import java.util.HashMap; >+import java.util.Iterator; > import java.util.List; > import java.util.Map; > >@@ -77,6 +78,7 @@ > private static final String EP_EXTENDEDCONFIGURATION = "editorConfiguration"; //$NON-NLS-1$ > private static ExtendedConfigurationBuilder instance = null; > public static final String VALUE = "value"; //$NON-NLS-1$ >+ public static final String PRIORITY = "priority"; //$NON-NLS-1$ > > /** > * Creates an extension. If the extension plugin has not been loaded a >@@ -185,7 +187,51 @@ > List configurations = getConfigurations(extensionType, targetID); > if (configurations.isEmpty()) > return null; >- return configurations.get(0); >+ >+ // select configuration with the highest 'priority' value >+ Iterator i = configurations.iterator(); >+ Object start = i.next(); >+ >+ if (start instanceof IConfigurationElement) { >+ IConfigurationElement rt = (IConfigurationElement) start; >+ float maxPriority = readPriority(rt); >+ >+ for (;i.hasNext();) { >+ Object next = i.next(); >+ if (next instanceof IConfigurationElement) { >+ IConfigurationElement configuration = (IConfigurationElement) i.next(); >+ float priority = readPriority(configuration); >+ if (priority > maxPriority) { >+ maxPriority = priority; >+ rt = configuration; >+ } >+ } >+ } >+ return rt; >+ } else { >+ return start; >+ } >+ } >+ >+ /** >+ * Reads the <code>priority</code> decimal value for configuration. >+ * If undefined or invalid, the default value is returned. >+ * Default value is <code>.0f</code>. >+ * @param configuration configuration element possibly containing the >+ * <code>priority</code> attribute >+ * @return value defined by <code>priority</code> attribute or >+ * <code>.0f</code>. >+ */ >+ private float readPriority(IConfigurationElement configuration) { >+ String priorityVal = configuration.getAttribute(PRIORITY); >+ if (priorityVal != null) { >+ try { >+ return Float.parseFloat(priorityVal); >+ } catch (NumberFormatException e) { >+ return .0f; >+ } >+ } >+ return .0f; > } > > /**
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 264653
:
125501
|
125941