JBoss Tools SVN: r24166 - trunk/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-13 15:43:35 -0400 (Fri, 13 Aug 2010)
New Revision: 24166
Removed:
trunk/xulrunner/features/
trunk/xulrunner/plugins/
trunk/xulrunner/site/
Log:
xulrunner component content deleted to add it from workspace to make svn update actually pick up the changes
15 years, 8 months
JBoss Tools SVN: r24165 - trunk/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-13 15:33:53 -0400 (Fri, 13 Aug 2010)
New Revision: 24165
Added:
trunk/xulrunner/features/
trunk/xulrunner/plugins/
trunk/xulrunner/site/
Log:
Copied: trunk/xulrunner/features (from rev 24164, branches/3.2.helios/xulrunner/features)
Copied: trunk/xulrunner/plugins (from rev 24164, branches/3.2.helios/xulrunner/plugins)
Copied: trunk/xulrunner/site (from rev 24164, branches/3.2.helios/xulrunner/site)
15 years, 8 months
JBoss Tools SVN: r24164 - trunk/xulrunner.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-13 15:33:28 -0400 (Fri, 13 Aug 2010)
New Revision: 24164
Removed:
trunk/xulrunner/features/
trunk/xulrunner/plugins/
trunk/xulrunner/site/
Log:
xulrunner component content deleted to switch to version from 3.2.helios branch to fix https://jira.jboss.org/browse/JBIDE-6824 DnD does not work in VPE after moving back to XULRunner 1.9.1.2
15 years, 8 months
JBoss Tools SVN: r24163 - in trunk/common/plugins: org.jboss.tools.common.model/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-13 14:20:08 -0400 (Fri, 13 Aug 2010)
New Revision: 24163
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties
trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model/build.properties
Log:
https://jira.jboss.org/browse/JBIDE-6430 Eclipse has a problem to reference org.jboss.tools.common.model.ui 3.1.1
verified and confirmed Jiri test case https://jira.jboss.org/browse/JBIDE-6430?focusedCommentId=12544776&page=c...
built with jars declared in manifest classpath
installed from locally built update site
verified that Jiri test case is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF 2010-08-13 18:02:38 UTC (rev 24162)
+++ trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF 2010-08-13 18:20:08 UTC (rev 24163)
@@ -85,3 +85,4 @@
org.eclipse.core.runtime;visibility:=reexport
Bundle-Version: 3.2.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: org.jboss.tools.common.model.jar
Modified: trunk/common/plugins/org.jboss.tools.common.model/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/build.properties 2010-08-13 18:02:38 UTC (rev 24162)
+++ trunk/common/plugins/org.jboss.tools.common.model/build.properties 2010-08-13 18:20:08 UTC (rev 24163)
@@ -1,11 +1,15 @@
-source.. = src/,\
- resources/
bin.includes = META-INF/,\
about.html,\
plugin.properties,\
plugin.xml,\
schema/,\
images/,\
- .
+ org.jboss.tools.common.model.jar
additional.bundles = org.eclipse.wst.common.emfworkbench.integration,\
org.eclipse.jem.util
+jars.compile.order = org.jboss.tools.common.model.jar
+output.org.jboss.tools.common.model.jar = bin/
+source.org.jboss.tools.common.model.jar = src/,\
+ resources/
+source.org.jboss.tools.common.model.jar = src/,\
+ resources/
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2010-08-13 18:02:38 UTC (rev 24162)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2010-08-13 18:20:08 UTC (rev 24163)
@@ -93,3 +93,4 @@
org.jboss.tools.common.ui
Bundle-Version: 3.2.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: org.jboss.tools.common.model.ui.jar
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties 2010-08-13 18:02:38 UTC (rev 24162)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties 2010-08-13 18:20:08 UTC (rev 24163)
@@ -4,8 +4,12 @@
META-INF/,\
images/,\
templates/,\
- .
-jars.compile.order = .
-output.. = bin/
+ org.jboss.tools.common.model.ui.jar
+jars.compile.order = org.jboss.tools.common.model.ui.jar
source.. = src/,\
resources/
+output.org.jboss.tools.common.model.ui.jar = bin/
+source.org.jboss.tools.common.model.ui.jar = src/,\
+ resources/
+source.org.jboss.tools.common.model.ui.jar = src/,\
+ resources/
15 years, 8 months
JBoss Tools SVN: r24162 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-13 14:02:38 -0400 (Fri, 13 Aug 2010)
New Revision: 24162
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
2010-08-13 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (DeltaCloud): Take the
url as a String input. Create the URL when constructing the client and add
"/api" to the user-specified url.
(getURL): Return the url directly.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-13 17:59:41 UTC (rev 24161)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-13 18:02:38 UTC (rev 24162)
@@ -1,3 +1,10 @@
+2010-08-13 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (DeltaCloud): Take the
+ url as a String input. Create the URL when constructing the client and add
+ "/api" to the user-specified url.
+ (getURL): Return the url directly.
+
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (destroyInstance): Fix to use
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-13 17:59:41 UTC (rev 24161)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-13 18:02:38 UTC (rev 24162)
@@ -19,15 +19,15 @@
private String name;
private String username;
- private URL url;
+ private String url;
private DeltaCloudClient client;
private ArrayList<DeltaCloudInstance> instances;
ListenerList instanceListeners = new ListenerList();
ListenerList imageListeners = new ListenerList();
- public DeltaCloud(String name, URL url, String username, String passwd) throws MalformedURLException {
- this.client = new DeltaCloudClient(url, username, passwd);
+ public DeltaCloud(String name, String url, String username, String passwd) throws MalformedURLException {
+ this.client = new DeltaCloudClient(new URL(url + "/api"), username, passwd); //$NON-NLS-1$
this.url = url;
this.name = name;
this.username = username;
@@ -38,7 +38,7 @@
}
public String getURL() {
- return url.toString();
+ return url;
}
public String getUsername() {
15 years, 8 months
JBoss Tools SVN: r24161 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-13 13:59:41 -0400 (Fri, 13 Aug 2010)
New Revision: 24161
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java
Log:
2010-08-13 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java (performFinish):
(performTest): Pass url as String to DeltaCloudClient.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java (checkURL): Don't
make synchronized as there is a special thread to run this now. Also, append api to url
automatically on behalf of the user. Use Display threads when accessing any UI widgets.
Enable the Test button if the URL is valid.
(createControl): Disable Test button by default.
(CheckURLThread): New class based on Thread specifically for running checkURL.
(validate): Use new CheckURLThread class to check the url.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-13 17:41:20 UTC (rev 24160)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-13 17:59:41 UTC (rev 24161)
@@ -1,3 +1,15 @@
+2010-08-13 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java (performFinish):
+ (performTest): Pass url as String to DeltaCloudClient.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java (checkURL): Don't
+ make synchronized as there is a special thread to run this now. Also, append api to url
+ automatically on behalf of the user. Use Display threads when accessing any UI widgets.
+ Enable the Test button if the URL is valid.
+ (createControl): Disable Test button by default.
+ (CheckURLThread): New class based on Thread specifically for running checkURL.
+ (validate): Use new CheckURLThread class to check the url.
+
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/CVMessages.java (getFormattedString): New method.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-08-13 17:41:20 UTC (rev 24160)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-08-13 17:59:41 UTC (rev 24161)
@@ -44,7 +44,7 @@
String username = mainPage.getUsername();
String password = mainPage.getPassword();
try {
- DeltaCloud newCloud = new DeltaCloud(name, new URL(url), username, password);
+ DeltaCloud newCloud = new DeltaCloud(name, url, username, password);
return newCloud.testConnection();
} catch (MalformedURLException e) {
Activator.log(e);
@@ -59,7 +59,7 @@
String username = mainPage.getUsername();
String password = mainPage.getPassword();
try {
- DeltaCloud newCloud = new DeltaCloud(name, new URL(url), username, password);
+ DeltaCloud newCloud = new DeltaCloud(name, url, username, password);
DeltaCloudManager.getDefault().addCloud(newCloud);
} catch (MalformedURLException e) {
Activator.log(e);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java 2010-08-13 17:41:20 UTC (rev 24160)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java 2010-08-13 17:59:41 UTC (rev 24161)
@@ -28,6 +28,7 @@
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
@@ -80,6 +81,18 @@
private boolean urlValid;
+ private class CheckURLThread extends Thread {
+
+ @Override
+ public void run() {
+ try {
+ checkURL();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
private Listener linkListener = new Listener() {
public void handleEvent(Event event) {
@@ -159,21 +172,9 @@
// Run check for valid DeltaCloud URL in separate thread
String urlValue = urlText.getText();
- if (urlValue.endsWith("api")) {
- ISafeRunnable runner = new ISafeRunnable() {
-
- @Override
- public void handleException(Throwable exception) {
- setURLValid(false);
- }
-
- @Override
- public void run() throws Exception {
- // TODO Auto-generated method stub
- checkURL();
- }
- };
- SafeRunner.run(runner);
+ if (urlValue.length() > 5) {
+ CheckURLThread t = new CheckURLThread();
+ t.start();
} else if (urlValue.length() > 0){
typeText.setText(WizardMessages.getString(NONCLOUD_URL));
complete = false;
@@ -204,14 +205,22 @@
// Method to check the URL for validity as Delta-cloud API specifier.
// Since this is run in thread, it does not use the setErrorMessage()
// method and instead writes error messages to the typeText label.
- private synchronized boolean checkURL() {
+ private boolean checkURL() {
boolean valid = false;
String oldurl = url;
- url = urlText.getText();
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ cloudType = typeText.getText();
+ url = urlText.getText();
+ }
+ });
+ String oldCloudType = cloudType;
if (url.length() > 0) {
if (!url.equals(oldurl)) {
try {
- URL u = new URL(url + ".xml");
+ URL u = new URL(url + "/api.xml"); //$NON-NLS-1$
Object o = u.getContent();
if (o instanceof InputStream) {
String xml = "";
@@ -226,7 +235,7 @@
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
while ((line = reader.readLine()) != null)
{
- sb.append(line).append("\n");
+ sb.append(line).append("\n"); //$NON-NLS-1$
}
xml = sb.toString();
}
@@ -261,11 +270,22 @@
cloudType = WizardMessages.getString(NONCLOUD_URL);
} catch (SAXException e) {
cloudType = WizardMessages.getString(NONCLOUD_URL);
+ } catch (Exception e) {
+ cloudType = WizardMessages.getString(INVALID_URL);
}
setURLValid(valid);
}
- if (!typeText.getText().equals(cloudType))
- typeText.setText(cloudType);
+ if (!oldCloudType.equals(cloudType)) {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ testButton.setEnabled(getURLValid());
+ typeText.setText(cloudType);
+ }
+
+ });
+ }
}
return valid;
}
@@ -331,6 +351,7 @@
testButton = new Button(container, SWT.NULL);
testButton.setText(WizardMessages.getString(TESTBUTTON_LABEL));
+ testButton.setEnabled(false);
testButton.addSelectionListener(buttonListener);
Link ec2userLink = new Link(container, SWT.NULL);
@@ -372,7 +393,7 @@
f = new FormData();
f.left = new FormAttachment(urlText, 0, SWT.LEFT);
- f.top = new FormAttachment(urlText, 5);
+ f.top = new FormAttachment(urlText, 8);
f.right = new FormAttachment(100, 0);
typeText.setLayoutData(f);
@@ -382,7 +403,7 @@
f = new FormData();
f.left = new FormAttachment(typeText, 0, SWT.LEFT);
- f.top = new FormAttachment(typeText, 13);
+ f.top = new FormAttachment(typeText, 10);
f.right = new FormAttachment(100, -70);
usernameText.setLayoutData(f);
15 years, 8 months
JBoss Tools SVN: r24159 - in trunk/bpel/plugins/org.eclipse.bpel.ui: src/org/eclipse/bpel/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2010-08-13 13:25:12 -0400 (Fri, 13 Aug 2010)
New Revision: 24159
Added:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixElement.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesProvider.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesSection.java
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.properties
trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6765
Added a Namespaces tab to the Property sheet
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.properties 2010-08-13 17:22:10 UTC (rev 24158)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.properties 2010-08-13 17:25:12 UTC (rev 24159)
@@ -29,6 +29,8 @@
DETAILS_PAGES_INITIALIZATION_LABEL=Initialization
DETAILS_PAGES_DOCUMENTATION_LABEL=Documentation
DETAILS_PAGES_MESSAGE_EXCHANGE_LABEL=Message Exchange
+# https://jira.jboss.org/browse/JBIDE-6765
+DETAILS_PAGES_NAMESPACEPREFIXES_LABEL=Namespaces
XPATH_LABEL=XPath 1.0
XPATH_LABEL20 = XPath 1.0 in BPEL 2.0
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2010-08-13 17:22:10 UTC (rev 24158)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/plugin.xml 2010-08-13 17:25:12 UTC (rev 24159)
@@ -187,7 +187,13 @@
afterTab="org.eclipse.bpel.ui.tabs.details"
category="implementation"
id="org.eclipse.bpel.ui.tabs.imports"/>
+ <!-- https://jira.jboss.org/browse/JBIDE-6765 -->
<propertyTab
+ label="%DETAILS_PAGES_NAMESPACEPREFIXES_LABEL"
+ afterTab="org.eclipse.bpel.ui.tabs.imports"
+ category="implementation"
+ id="org.eclipse.bpel.ui.tabs.namespacePrefixes"/>
+ <propertyTab
label="%DETAILS_PAGES_EXPIRATION_LABEL"
afterTab="org.eclipse.bpel.ui.tabs.details"
category="implementation"
@@ -250,7 +256,15 @@
id="org.eclipse.bpel.ui.sections.Imports">
<input type="org.eclipse.bpel.model.Process"/>
</propertySection>
+ <!-- https://jira.jboss.org/browse/JBIDE-6765 -->
<propertySection
+ tab="org.eclipse.bpel.ui.tabs.namespacePrefixes"
+ class="org.eclipse.bpel.ui.properties.NamespacePrefixesSection"
+ id="org.eclipse.bpel.ui.sections.NamespacePrefixes">
+ <input type="org.eclipse.bpel.model.Activity"/>
+ <input type="org.eclipse.bpel.model.Process"/>
+ </propertySection>
+ <propertySection
afterSection="org.eclipse.bpel.ui.sections.JoinCondition"
tab="org.eclipse.bpel.ui.tabs.joinBehaviour"
class="org.eclipse.bpel.ui.properties.JoinFailureSection"
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java 2010-08-13 17:22:10 UTC (rev 24158)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/IHelpContextIds.java 2010-08-13 17:25:12 UTC (rev 24159)
@@ -37,6 +37,8 @@
public static final String PROPERTY_PAGE_COMPENSATE_IMPLEMENTATION = PREFIX + "IMP090"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_ONEVENT_IMPLEMENTATION = PREFIX + "IMP100"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_BPEL_IMPORTS = PREFIX + "IMT010"; //$NON-NLS-1$
+ // https://jira.jboss.org/browse/JBIDE-6765
+ public static final String PROPERTY_PAGE_BPEL_NAMESPACE_PREFIXES = PREFIX + "NST010"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_REPEAT_ALARM = PREFIX + "RPT010"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_WAIT_DATE = PREFIX + "WAT010"; //$NON-NLS-1$
public static final String PROPERTY_PAGE_WAIT_DURATION = PREFIX + "WAT020"; //$NON-NLS-1$
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2010-08-13 17:22:10 UTC (rev 24158)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2010-08-13 17:25:12 UTC (rev 24159)
@@ -47,6 +47,13 @@
public static String ImportsSection_1;
public static String ImportsSection_2;
public static String ImportsSection_3;
+ // https://jira.jboss.org/browse/JBIDE-6765
+ public static String NamespacePrefixesSection;
+ public static String NamespacePrefixesSection_0;
+ public static String NamespacePrefixesSection_1;
+ public static String NamespacePrefixesSection_2;
+ public static String NamespacePrefixesSection_3;
+ public static String NamespacePrefixesSection_4;
public static String InputMessageAdapter_0;
public static String InvokeImplSection_0;
public static String InvokeImplSection_1;
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2010-08-13 17:22:10 UTC (rev 24158)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2010-08-13 17:25:12 UTC (rev 24159)
@@ -638,6 +638,13 @@
ImportsSection_1=Import an &XSD ...
ImportsSection_2=&Remove
ImportsSection_3=Import Type
+# https://jira.jboss.org/browse/JBIDE-6765
+NamespacePrefixesSection=Namespace Prefixes
+NamespacePrefixesSection_0=Prefix
+NamespacePrefixesSection_1=Namespace
+NamespacePrefixesSection_2=Scope
+NamespacePrefixesSection_3=Location
+NamespacePrefixesSection_4=Assign Prefix
BrowseSelectorDialog_0=Name (* and ? are wildcards):
BrowseSelectorDialog_1=Matches:
BrowseSelectorDialog_2=Browse Source
Added: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixElement.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixElement.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixElement.java 2010-08-13 17:25:12 UTC (rev 24159)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+ package org.eclipse.bpel.ui.properties;
+
+import org.eclipse.emf.ecore.EObject;
+
+/*
+ * This represents an entry in the NamespacesPrefixesSection table in the Namespaces Property Tab.
+ * The NamespacesPrefixesProvider builds a list of these to be displayed in the table.
+ *
+ * @see https://jira.jboss.org/browse/JBIDE-6765
+ * @author Bob Brodt
+ * @date Aug 13, 2010
+ */
+public class NamespacePrefixElement {
+
+ public String prefix;
+ public String namespace;
+ public EObject context;
+ public String location;
+
+ public NamespacePrefixElement(String prefix, String namespace, EObject context, String location)
+ {
+ this.prefix = prefix;
+ this.namespace = namespace;
+ this.context = context;
+ this.location = location;
+ }
+}
\ No newline at end of file
Added: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesProvider.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesProvider.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesProvider.java 2010-08-13 17:25:12 UTC (rev 24159)
@@ -0,0 +1,216 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.eclipse.bpel.ui.properties;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+//import org.eclipse.bpel.model.Import;
+import org.eclipse.bpel.model.Process;
+import org.eclipse.bpel.model.util.BPELConstants;
+import org.eclipse.bpel.model.util.BPELUtils;
+import org.eclipse.bpel.model.util.ImportResolver;
+import org.eclipse.bpel.model.util.ImportResolverRegistry;
+import org.eclipse.bpel.ui.details.providers.AbstractContentProvider;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.wst.wsdl.Definition;
+//import org.eclipse.wst.wsdl.Import;
+import org.eclipse.wst.wsdl.util.WSDLConstants;
+
+/*
+ * Content provider for the NamespacesPrefixesSection table in the Namespaces Property Tab.
+ * Input is the BPEL Activity or Process object currently selected in the editor canvas.
+ * The provider collects all of the namespaces in scope for the input EObject and tries
+ * to correlate them with imported artifacts. The result, a list of NamespacePrefixesElement,
+ * is displayed in the table Namespaces Property Tab.
+ *
+ * @see https://jira.jboss.org/browse/JBIDE-6765
+ * @author Bob Brodt
+ * @date Aug 13, 2010
+ */
+public class NamespacePrefixesProvider extends AbstractContentProvider {
+
+ /**
+ * @see org.eclipse.bpel.ui.details.providers.AbstractContentProvider#collectElements(java.lang.Object, java.util.List)
+ */
+ @Override
+ public void collectElements(Object input, List<Object> list) {
+
+ List<NamespacePrefixElement> elements = new ArrayList<NamespacePrefixElement>();
+
+ // build the list of elements
+ // find the process for this BPEL model object
+ Process process = null;
+ if (input instanceof EObject)
+ {
+ EObject context = (EObject)input;
+ process = BPELUtils.getProcess(input);
+ // walk up the BPEL activity ancestry starting at the input element
+ // and collect all in-scope namespace info
+ while (context!=null)
+ {
+ Map<String, String> map = BPELUtils.getNamespaceMap(context);
+ for (Map.Entry e : map.entrySet())
+ {
+ String ns = e.getValue().toString();
+ NamespacePrefixElement elem = new NamespacePrefixElement((String)e.getKey(), ns, context,null);
+ elements.add(elem);
+ if( BPELConstants.NAMESPACE_2007.equals(ns) ||
+ process.getTargetNamespace().equals(ns))
+ {
+ elem.location = process.eResource().getURI().lastSegment();
+ }
+ }
+ context = context.eContainer();
+ }
+ }
+
+ // get the list of imports from the Process and try to correlate
+ // the namespaces to the imported artifact in which it's defined
+ List<Object> imports = new ArrayList<Object>();
+ if ( process!=null )
+ {
+ for (org.eclipse.bpel.model.Import imp : process.getImports())
+ {
+ imports.add(imp);
+
+ if ( imp.getImportType().equals(WSDLConstants.WSDL_NAMESPACE_URI) )
+ {
+ // yikes! don't load WSDLs from WS sites - this takes forever!
+ if (!imp.getLocation().startsWith("http://") && !imp.getLocation().startsWith("https://"))
+ {
+ ImportResolver r = ImportResolverRegistry.INSTANCE.getResolvers(imp.getImportType())[0];
+ Definition wsdl = (Definition) r.resolve(imp, ImportResolver.RESOLVE_DEFINITION).get(0);
+ recurseImports(wsdl.getImports(), imports, elements);
+ }
+ }
+ }
+ }
+
+ // now match up the namespaces from the imports to the local namespace maps in elements
+ for (Object o : imports)
+ {
+ String namespace = "";
+ String location = "";
+ if (o instanceof org.eclipse.wst.wsdl.Import)
+ {
+ location = ((org.eclipse.wst.wsdl.Import)o).getLocationURI();
+ namespace = ((org.eclipse.wst.wsdl.Import)o).getNamespaceURI();
+ }
+ else if (o instanceof org.eclipse.bpel.model.Import)
+ {
+ location = ((org.eclipse.bpel.model.Import)o).getLocation();
+ namespace = ((org.eclipse.bpel.model.Import)o).getNamespace();
+ }
+ else
+ continue;
+
+ boolean found = false;
+ for (NamespacePrefixElement elem : elements)
+ {
+ if (namespace.equals(elem.namespace))
+ {
+ if (elem.location==null)
+ elem.location = location;
+ found = true;
+ }
+ }
+ if (!found)
+ {
+ // here's a namespace that wasn't found in any BPEL activity scope
+ // let's add it to our list with an empty ns prefix and context.
+ elements.add(new NamespacePrefixElement("", namespace, null, location));
+ }
+ }
+
+ list.addAll(elements);
+ // sort list alphabetically on prefix name
+ Collections.sort(list,new Comparator()
+ {
+ @Override
+ public int compare(Object o1, Object o2) {
+ return ((NamespacePrefixElement)o1).prefix.compareTo(((NamespacePrefixElement)o2).prefix);
+ }
+ });
+ }
+
+ private void recurseImports(Map<Object,Object> m, List<Object> imports, List<NamespacePrefixElement>elements)
+ {
+ for (Map.Entry e : m.entrySet())
+ {
+ ArrayList<org.eclipse.wst.wsdl.Import> v = (ArrayList<org.eclipse.wst.wsdl.Import>)e.getValue();
+ for (org.eclipse.wst.wsdl.Import wsdlImp : v)
+ {
+ boolean foundNew = true;
+ for (Object o : imports)
+ {
+ if (o instanceof org.eclipse.wst.wsdl.Import)
+ {
+ Definition wsdl = ((org.eclipse.wst.wsdl.Import)o).getEDefinition();
+
+ if ( ((org.eclipse.wst.wsdl.Import)o).getLocationURI().equals(wsdlImp.getLocationURI()) )
+ foundNew = false;
+
+ Object ns = wsdl.getNamespaces().entrySet();
+ System.out.println("ns="+ns);
+ }
+ else if (o instanceof org.eclipse.bpel.model.Import)
+ {
+ if ( ((org.eclipse.bpel.model.Import)o).getLocation().equals(wsdlImp.getLocationURI()) )
+ foundNew = false;
+ }
+ }
+ if (foundNew)
+ imports.add(wsdlImp);
+
+ if (!wsdlImp.getLocationURI().startsWith("http://"))
+ {
+ if (wsdlImp.getDefinition()!=null)
+ {
+ // let's see if this WSDL defines a namespace for which we're missing a location
+ for (NamespacePrefixElement elem : elements)
+ {
+ if (elem.location==null)
+ {
+ Map<Object,Object> ns = wsdlImp.getDefinition().getNamespaces();
+ for (Map.Entry ens : ns.entrySet())
+ {
+ if (ens.getValue().equals(elem.namespace))
+ {
+ elem.location = wsdlImp.getLocationURI();
+ break;
+ }
+ }
+
+ }
+ }
+ recurseImports(wsdlImp.getDefinition().getImports(), imports, elements);
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesSection.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesSection.java (rev 0)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/NamespacePrefixesSection.java 2010-08-13 17:25:12 UTC (rev 24159)
@@ -0,0 +1,418 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.eclipse.bpel.ui.properties;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.bpel.common.ui.details.IDetailsAreaConstants;
+import org.eclipse.bpel.common.ui.flatui.FlatFormAttachment;
+import org.eclipse.bpel.common.ui.flatui.FlatFormData;
+import org.eclipse.bpel.model.Activity;
+import org.eclipse.bpel.model.Import;
+import org.eclipse.bpel.model.Process;
+import org.eclipse.bpel.model.util.BPELUtils;
+import org.eclipse.bpel.ui.IBPELUIConstants;
+import org.eclipse.bpel.ui.IHelpContextIds;
+import org.eclipse.bpel.ui.Messages;
+import org.eclipse.bpel.ui.commands.AddImportCommand;
+import org.eclipse.bpel.ui.commands.RemoveImportCommand;
+import org.eclipse.bpel.ui.details.providers.ColumnTableProvider;
+import org.eclipse.bpel.ui.dialogs.NamespaceMappingDialog;
+import org.eclipse.bpel.ui.dialogs.SchemaImportDialog;
+import org.eclipse.bpel.ui.util.BPELUtil;
+import org.eclipse.bpel.ui.util.MultiObjectAdapter;
+import org.eclipse.bpel.ui.util.NamespaceUtils;
+import org.eclipse.bpel.ui.util.TableCursor;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.wsdl.internal.impl.ImportImpl;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * The Namespaces Property Tab contains a table of namespaces in scope for the currently
+ * selected BPEL activity or the process. The table has the following columns:
+ *
+ * Prefix - the namespace prefix. This could be empty if the namespace was defined in
+ * an imported artifact (WSDL or XSD)
+ * Namespace - the namespace definition
+ * Context - the Activity or Process in which the namespace prefix was defined
+ * Location - the resource artifact that defines the namespace
+ *
+ * A button with the label "Assign Prefix" will be enabled if the current selection in
+ * the able has no namespace prefix. This will allow the user to assign a prefix.
+ *
+ * @see https://jira.jboss.org/browse/JBIDE-6765
+ * @author Bob Brodt
+ * @date Aug 13, 2010
+ */
+public class NamespacePrefixesSection extends BPELPropertySection {
+
+ protected Composite parentComposite;
+
+ protected Composite activityComposite;
+
+ protected Label tabLabel;
+
+ protected Table prefixesTable;
+
+ protected TableViewer prefixesViewer;
+
+ protected ColumnTableProvider tableProvider;
+
+ protected TableCursor tableCursor = null;
+
+ /**
+ * Make this section use all the vertical space it can get.
+ *
+ */
+ @Override
+ public boolean shouldUseExtraSpace() {
+ return true;
+ }
+
+ /**
+ * Bug 290085 - Override the super-class because the input is Process not Import
+ * If use super-class's directly, when change the import attributes
+ * the properties section do not change. Grid Qian
+ */
+ @Override
+ protected void addAllAdapters() {
+ super.addAllAdapters();
+ if (fAdapters.length > 0) {
+ if (getModel() != null) {
+ EObject obj = getModel();
+ if (obj instanceof Process) {
+ List<Import> list = ((Process) obj).getImports();
+ for (int i = 0; i < list.size(); i++) {
+ fAdapters[0].addToObject((Import) list.get(i));
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected MultiObjectAdapter[] createAdapters() {
+ return new MultiObjectAdapter[] { new MultiObjectAdapter() {
+ @Override
+ public void notify(Notification n) {
+ prefixesViewer.setInput(getInput());
+ }
+ }, };
+ }
+
+ protected void createWidgets(Composite parent) {
+
+ FlatFormData data;
+
+ final Button assignPrefixButton = fWidgetFactory.createButton(parent,
+ Messages.NamespacePrefixesSection_4, SWT.PUSH);
+ assignPrefixButton.setEnabled(false);
+
+ assignPrefixButton.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ assignPrefix();
+ }
+ });
+
+ data = new FlatFormData();
+ data.right = new FlatFormAttachment(100, -5
+ * IDetailsAreaConstants.HSPACE);
+ data.top = new FlatFormAttachment(0, IDetailsAreaConstants.VSPACE);
+ assignPrefixButton.setLayoutData(data);
+
+ tabLabel = fWidgetFactory.createLabel(parent,
+ Messages.NamespacePrefixesSection);
+ data = new FlatFormData();
+ data.left = new FlatFormAttachment(0, IDetailsAreaConstants.HSPACE);
+ data.top = new FlatFormAttachment(assignPrefixButton,
+ IDetailsAreaConstants.VSPACE);
+ tabLabel.setLayoutData(data);
+
+ // create table
+ prefixesTable = fWidgetFactory.createTable(parent, SWT.FULL_SELECTION | SWT.V_SCROLL
+ | SWT.READ_ONLY);
+
+ data = new FlatFormData();
+ data.left = new FlatFormAttachment(0, IDetailsAreaConstants.HSPACE);
+ data.right = new FlatFormAttachment(100, -5
+ * IDetailsAreaConstants.HSPACE);
+ data.top = new FlatFormAttachment(tabLabel,
+ IDetailsAreaConstants.VSPACE);
+ data.bottom = new FlatFormAttachment(100, -IDetailsAreaConstants.HSPACE);
+ prefixesTable.setLayoutData(data);
+
+ // set up table
+ prefixesTable.setLinesVisible(true);
+ prefixesTable.setHeaderVisible(true);
+
+ tableProvider = new ColumnTableProvider();
+ tableProvider.add(new PrefixColumn());
+ tableProvider.add(new NamespaceColumn());
+ tableProvider.add(new ContextColumn());
+ tableProvider.add(new LocationColumn());
+
+ prefixesViewer = new TableViewer(prefixesTable);
+ tableProvider.createTableLayout(prefixesTable);
+ prefixesViewer.setLabelProvider(tableProvider);
+ prefixesViewer.setCellModifier(tableProvider);
+ prefixesViewer.setContentProvider(new NamespacePrefixesProvider());
+ prefixesViewer.setColumnProperties(tableProvider.getColumnProperties());
+ prefixesViewer.setCellEditors(tableProvider.createCellEditors(prefixesTable));
+
+ prefixesViewer
+ .addPostSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (event.getSelection() instanceof StructuredSelection)
+ {
+ StructuredSelection sel = (StructuredSelection)event.getSelection();
+ NamespacePrefixElement elem = (NamespacePrefixElement)sel.getFirstElement();
+ if (elem!=null && (elem.prefix==null || elem.prefix.length()==0))
+ assignPrefixButton.setEnabled(true);
+ else
+ assignPrefixButton.setEnabled(false);
+ }
+ }
+ });
+
+ tableCursor = BPELUtil.createTableCursor(prefixesTable, prefixesViewer);
+ }
+
+ public class PrefixColumn extends ColumnTableProvider.Column implements
+ ILabelProvider {
+
+ @Override
+ public String getHeaderText() {
+ return Messages.NamespacePrefixesSection_0;
+ }
+
+ @Override
+ public String getProperty() {
+ return "NamespacePrefix"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getInitialWeight() {
+ return 10;
+ }
+
+ public String getText(Object element) {
+
+ String s = ((NamespacePrefixElement)element).prefix;
+ return (s == null) ? "" : s; //$NON-NLS-1$
+ }
+ }
+
+ public class NamespaceColumn extends ColumnTableProvider.Column implements
+ ILabelProvider {
+ @Override
+ public String getHeaderText() {
+ return Messages.NamespacePrefixesSection_1;
+ }
+
+ @Override
+ public String getProperty() {
+ return "Namespace"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getInitialWeight() {
+ return 40;
+ }
+
+ public String getText(Object element) {
+
+ String s = ((NamespacePrefixElement)element).namespace;
+ return (s == null) ? "" : s; //$NON-NLS-1$
+ }
+ }
+
+ public class ContextColumn extends ColumnTableProvider.Column implements
+ ILabelProvider {
+
+ @Override
+ public String getHeaderText() {
+ return Messages.NamespacePrefixesSection_2;
+ }
+
+ @Override
+ public String getProperty() {
+ return "Context"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getInitialWeight() {
+ return 10;
+ }
+
+ public String getText(Object element) {
+
+ String s = null;
+ EObject obj = ((NamespacePrefixElement)element).context;
+ if (obj instanceof Process)
+ s = "Process " + ((Process)obj).getName();
+ else if (obj instanceof Activity)
+ s = "Activity " + ((Activity)obj).getName();
+ return (s == null) ? "" : s; //$NON-NLS-1$
+ }
+ }
+
+ public class LocationColumn extends ColumnTableProvider.Column implements
+ ILabelProvider {
+ @Override
+ public String getHeaderText() {
+ return Messages.NamespacePrefixesSection_3;
+ }
+
+ @Override
+ public String getProperty() {
+ return "Location"; //$NON-NLS-1$
+ }
+
+ @Override
+ public int getInitialWeight() {
+ return 40;
+ }
+
+ public String getText(Object element) {
+
+ String s = ((NamespacePrefixElement)element).location;
+ return (s == null) ? "" : s; //$NON-NLS-1$
+ }
+ }
+
+
+
+ @Override
+ protected void basicSetInput(EObject newInput) {
+ super.basicSetInput(newInput);
+
+ if (getInput() != null) {
+ prefixesViewer.setInput(getInput());
+ }
+ }
+
+
+ @Override
+ protected void createClient(Composite parent) {
+ Composite composite = parentComposite = createFlatFormComposite(parent);
+
+ createWidgets(composite);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parentComposite,
+ IHelpContextIds.PROPERTY_PAGE_BPEL_NAMESPACE_PREFIXES);
+ }
+
+ @Override
+ public Object getUserContext() {
+ return ((StructuredSelection) prefixesViewer.getSelection())
+ .getFirstElement();
+ }
+
+ @Override
+ public void restoreUserContext(Object userContext) {
+ prefixesTable.setFocus();
+ if (userContext != null) {
+ prefixesViewer.setSelection(new StructuredSelection(userContext));
+ }
+ }
+
+ void assignPrefix () {
+
+ ISelection selection = prefixesViewer.getSelection();
+ if (selection.isEmpty()) {
+ return ;
+ }
+ IStructuredSelection ssel = null;
+ if ( (selection instanceof IStructuredSelection) == false) {
+ return;
+ }
+
+ ssel = (IStructuredSelection) selection;
+ NamespacePrefixElement elem = (NamespacePrefixElement)ssel.getFirstElement();
+
+ EObject modelObject = elem.context;
+ if (modelObject==null)
+ modelObject = this.fModelObject;
+
+ // We have to map the namespace to a prefix.
+ NamespaceMappingDialog dialog = new NamespaceMappingDialog(tabLabel.getShell(),modelObject);
+ dialog.setNamespace( elem.namespace );
+
+ if (dialog.open() == Window.CANCEL) {
+ return;
+ }
+
+ // define the prefix
+ BPELUtils.setPrefix( modelObject, elem.namespace, dialog.getPrefix());
+ elem.prefix = dialog.getPrefix();
+ elem.context = modelObject;
+
+ prefixesViewer.refresh();
+ }
+
+
+
+ @Override
+ public void gotoMarker(IMarker marker) {
+ // TODO Auto-generated method stub
+ super.gotoMarker(marker);
+ }
+
+ /**
+ *
+ */
+
+
+ @Override
+ public boolean isValidMarker(IMarker marker) {
+ return super.isValidMarker(marker);
+ }
+
+
+
+}
15 years, 8 months
JBoss Tools SVN: r24158 - workspace/dgolovin.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-13 13:22:10 -0400 (Fri, 13 Aug 2010)
New Revision: 24158
Added:
workspace/dgolovin/xulrunner/
Log:
copy of xulrunner from trunk before I restor it from 3.2.helios branch
Copied: workspace/dgolovin/xulrunner (from rev 24157, trunk/xulrunner)
15 years, 8 months