JBoss Tools SVN: r40311 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-04-18 16:53:04 -0400 (Wed, 18 Apr 2012)
New Revision: 40311
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
Log:
cosmetic change, let server view show updated module state
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2012-04-18 20:51:53 UTC (rev 40310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2012-04-18 20:53:04 UTC (rev 40311)
@@ -131,7 +131,17 @@
s.setModulePublishState((IModule[])allChildren.get(j), type);
}
}
- s.publish(IServer.PUBLISH_INCREMENTAL, null, getUserInitiatedAdaptable(), null);
+ final IServer s2 = s;
+ new Thread() {
+ public void run() {
+ try {
+ Thread.sleep(1000);
+ } catch(InterruptedException ie) {
+ // Ignore
+ }
+ s2.publish(IServer.PUBLISH_INCREMENTAL, null, getUserInitiatedAdaptable(), null);
+ }
+ }.start();
}
}
13 years, 11 months
JBoss Tools SVN: r40310 - in trunk/as/plugins: org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-04-18 16:51:53 -0400 (Wed, 18 Apr 2012)
New Revision: 40310
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java
Log:
JBIDE-10903
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java 2012-04-18 20:43:00 UTC (rev 40309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java 2012-04-18 20:51:53 UTC (rev 40310)
@@ -24,16 +24,13 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerEvent;
-import org.jboss.dmr.ModelNode;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties;
-import org.jboss.ide.eclipse.as.core.server.v7.management.AS7ManagementDetails;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.management.core.IJBoss7ManagerService;
-import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
public class LocalJBoss7DeploymentScannerAdditions extends UnitedServerListener {
protected boolean accepts(IServer server) {
@@ -57,6 +54,7 @@
* @param folders
*/
protected void ensureScannersAdded(final IServer server, final String[] folders) {
+ Trace.trace(Trace.STRING_FINER, "Adding AS7 Deployment Scanners"); //$NON-NLS-1$
ArrayList<String> asList = new ArrayList<String>();
asList.addAll(Arrays.asList(folders));
ArrayList<String> added = new ArrayList<String>(); // list of the paths
@@ -75,17 +73,19 @@
JBossServerCorePlugin.log(failStat);
}
}
-
- Iterator<Object> i2 = props.keySet().iterator();
+
+ // Properties file of format like: JBossToolsScanner4=/some/folder
+ Iterator<Object> lastStartup = props.keySet().iterator();
String k = null;
String v = null;
- while(i2.hasNext()) {
- k = (String)i2.next();
+ while(lastStartup.hasNext()) {
+ k = (String)lastStartup.next();
v = (String)props.get(k);
if( !asList.contains(v))
removed.add(k);
else {
added.remove(v);
+ Trace.trace(Trace.STRING_FINEST, "Unchanged Deployment Scanner " + k + ":" + v); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -100,6 +100,7 @@
if( s.isOK()) {
props.remove(scannerName);
}
+ Trace.trace(Trace.STRING_FINER, "Removed Deployment Scanner: success="+s.isOK() + ", " + scannerName + ":" + props.get(scannerName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Do the adds
@@ -113,8 +114,9 @@
if( s.isOK()){
props.put(newScannerName, path);
}
+ Trace.trace(Trace.STRING_FINER, "Added Deployment Scanner: success="+s.isOK() + ", " + scannerName + ":" + props.get(scannerName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
+
// Write the file out
if( added.size() != 0 || removed.size() != 0 ) {
try {
@@ -125,6 +127,7 @@
JBossServerCorePlugin.log(failStat);
}
}
+ Trace.trace(Trace.STRING_FINER, "Finished Adding AS7 Deployment Scanners"); //$NON-NLS-1$
}
private static final String SCANNER_PREFIX = "JBossToolsScanner"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java 2012-04-18 20:43:00 UTC (rev 40309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java 2012-04-18 20:51:53 UTC (rev 40310)
@@ -21,6 +21,7 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerEvent;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -48,8 +49,10 @@
protected void modifyDeploymentScanners(ServerEvent event){
String[] folders = getDeployLocationFolders(event.getServer());
+ Trace.trace(Trace.STRING_FINER, "Adding " + folders.length + " Deployment Scanners via JMX"); //$NON-NLS-1$
if( folders.length > 0 )
ensureScannersAdded(event.getServer(), folders);
+ Trace.trace(Trace.STRING_FINER, "Finished Adding Deployment Scanners via JMX"); //$NON-NLS-1$
}
protected void ensureScannersAdded(final IServer server, final String[] folders) {
@@ -72,6 +75,7 @@
MBeanServerConnection connection, String[] folders2) throws Exception {
for( int i = 0; i < folders2.length; i++ ) {
String asURL = encode(folders2[i]);
+ Trace.trace(Trace.STRING_FINER, "Adding Deployment Scanner: " + asURL);
ObjectName name = new ObjectName(IJBossRuntimeConstants.DEPLOYMENT_SCANNER_MBEAN_NAME);
connection.invoke(name, IJBossRuntimeConstants.addURL, new Object[] { asURL }, new String[] {String.class.getName()});
}
13 years, 11 months
JBoss Tools SVN: r40309 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 16:43:00 -0400 (Wed, 18 Apr 2012)
New Revision: 40309
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
Log:
using fixed method for adding runtime
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-04-18 20:42:14 UTC (rev 40308)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/RESTfulTestBase.java 2012-04-18 20:43:00 UTC (rev 40309)
@@ -63,7 +63,8 @@
importWSTestProject("resources/projects/" +
getWsProjectName(), getWsProjectName());
//set target runtime - TO DO
- projectHelper.addDefaultRuntimeIntoProject(getWsProjectName());
+ projectHelper.addConfiguredRuntimeIntoProject(
+ getWsProjectName(), configuredState.getServer().name);
projectExplorer.selectProject(getWsProjectName());
eclipse.cleanAllProjects();
13 years, 11 months
JBoss Tools SVN: r40308 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 16:42:14 -0400 (Wed, 18 Apr 2012)
New Revision: 40308
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
Log:
fixing method for adding configured targeted runtime
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-04-18 20:41:09 UTC (rev 40307)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-04-18 20:42:14 UTC (rev 40308)
@@ -143,7 +143,8 @@
* Add first defined runtime into project as targeted runtime
* @param project
*/
- public void addDefaultRuntimeIntoProject(String project) {
+ public void addConfiguredRuntimeIntoProject(String project,
+ String configuredRuntime) {
projectExplorer.selectProject(project);
bot.menu(IDELabel.Menu.FILE).menu(
IDELabel.Menu.PROPERTIES).click();
@@ -157,7 +158,11 @@
for (int i = 0; i < runtimes.rowCount(); i++) {
runtimes.getTableItem(i).uncheck();
}
- bot.table().getTableItem(0).check();
+ for (int i = 0; i < runtimes.rowCount(); i++) {
+ if (runtimes.getTableItem(i).getText().equals(configuredRuntime)) {
+ runtimes.getTableItem(i).check();
+ }
+ }
bot.button(IDELabel.Button.OK).click();
bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
TaskDuration.LONG.getTimeout());
13 years, 11 months
JBoss Tools SVN: r40307 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 16:41:09 -0400 (Wed, 18 Apr 2012)
New Revision: 40307
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestService.java
Removed:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java
Log:
renaming class in resource project
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestService.java 2012-04-18 20:41:09 UTC (rev 40307)
@@ -0,0 +1,5 @@
+package org.rest.test;
+
+public class RestService {
+
+}
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java 2012-04-18 20:06:26 UTC (rev 40306)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/projects/restEmpty/src/org/rest/test/RestServuce.java 2012-04-18 20:41:09 UTC (rev 40307)
@@ -1,5 +0,0 @@
-package org.rest.test;
-
-public class RestServuce {
-
-}
13 years, 11 months
JBoss Tools SVN: r40306 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 16:06:26 -0400 (Wed, 18 Apr 2012)
New Revision: 40306
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/.api_filters
Log:
api filters modification
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/.api_filters
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/.api_filters 2012-04-18 19:59:01 UTC (rev 40305)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/.api_filters 2012-04-18 20:06:26 UTC (rev 40306)
@@ -1,49 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.jboss.tools.ws.ui.bot.test" version="2">
- <resource path="src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java" type="org.jboss.tools.ws.ui.bot.test.WSTestBase">
- <filter id="627060751">
- <message_arguments>
- <message_argument value="DeploymentHelper"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="deploymentHelper"/>
- </message_arguments>
- </filter>
- <filter id="627060751">
- <message_arguments>
- <message_argument value="ProjectHelper"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="projectHelper"/>
- </message_arguments>
- </filter>
- <filter id="627060751">
- <message_arguments>
- <message_argument value="ResourceHelper"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="resourceHelper"/>
- </message_arguments>
- </filter>
- <filter id="627060751">
- <message_arguments>
- <message_argument value="WebServiceClientHelper"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="clientHelper"/>
- </message_arguments>
- </filter>
- <filter id="643842064">
- <message_arguments>
- <message_argument value="Slider_Level"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="getLevel()"/>
- </message_arguments>
- </filter>
- <filter id="643846161">
- <message_arguments>
- <message_argument value="Slider_Level"/>
- <message_argument value="WSTestBase"/>
- <message_argument value="setLevel(WsWizardBaseSlider_Level)"/>
- </message_arguments>
- </filter>
- </resource>
<resource path="src/org/jboss/tools/ws/ui/bot/test/webservice/eap/EAPFromJavaTest.java" type="org.jboss.tools.ws.ui.bot.test.webservice.eap.EAPFromJavaTest">
<filter id="576720909">
<message_arguments>
13 years, 11 months
JBoss Tools SVN: r40305 - in trunk/modeshape/plugins: org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-04-18 15:59:01 -0400 (Wed, 18 Apr 2012)
New Revision: 40305
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/JcrUiConstants.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndEditor.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndMessages.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/cndMessages.properties
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/preferences/CndPreferencePage.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/NamespaceMapping.java
Log:
JBIDE-11575 The ModeShape Tools JCR CND Preference Page Should Show Notation Type Preview. Added a preview box to the preference page that changes when the user selects a notation type. Add a hyperlink in CND Editor to open preferences dialog.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -10,7 +10,7 @@
import org.eclipse.osgi.util.NLS;
/**
- *
+ * i18n messages for the ModeShape JCR plugin.
*/
public final class Messages extends NLS {
@@ -31,11 +31,11 @@
public static String defaultTypeExistsButMarkedAsVariant;
/**
- * A message indicating a child node definition has a default type but that it does not match a required type. Two parameters, the
- * child node definition name and the default type name, are required.
+ * A message indicating a child node definition has a default type but that it does not match a required type. Two parameters,
+ * the child node definition name and the default type name, are required.
*/
public static String defaultTypeDoesNotMatchRequiredType;
-
+
/**
* The name for the child definition's default type property.
*/
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/NamespaceMapping.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/NamespaceMapping.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/NamespaceMapping.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -228,7 +228,17 @@
final StringBuilder builder = new StringBuilder();
builder.append(NOTATION_PREFIX);
builder.append(this.prefix.toCndNotation(notationType));
+
+ if (NotationType.LONG == notationType) {
+ builder.append(Utils.SPACE_STRING);
+ }
+
builder.append(NOTATION_DELIMITER);
+
+ if (NotationType.LONG == notationType) {
+ builder.append(Utils.SPACE_STRING);
+ }
+
builder.append(Utils.SINGLE_QUOTE);
builder.append(this.uri.get());
builder.append(Utils.SINGLE_QUOTE);
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/JcrUiConstants.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/JcrUiConstants.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/JcrUiConstants.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -80,4 +80,11 @@
*/
String SHOW_INHERITED = ICONS_FOLDER + "show-inherited-16x.gif"; //$NON-NLS-1$
}
+
+ /**
+ * Constants relating to JCR preferences.
+ */
+ interface PreferenceIds {
+ String CND_PREFERENCE_PAGE = "org.jboss.tools.modeshape.jcr.ui.jcrPreferencePage"; //$NON-NLS-1$
+ }
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndEditor.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndEditor.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndEditor.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.ControlContribution;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IMessageProvider;
@@ -36,6 +37,8 @@
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
@@ -45,6 +48,7 @@
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPersistableEditor;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.editors.text.FileDocumentProvider;
import org.eclipse.ui.editors.text.TextEditor;
@@ -56,6 +60,7 @@
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.Form;
+import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType;
@@ -254,10 +259,33 @@
}
});
- //
- // createActions();
- // contributeToToolBar(form.getToolBarManager());
- // contributeToMenu(form.getMenuManager());
+ form.getToolBarManager().add(new ControlContribution(null) {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createControl( final Composite parent ) {
+ final Hyperlink hlink = getToolkit().createHyperlink(parent, CndMessages.openCndEditorPreferencesHyperlink,
+ SWT.NULL);
+ hlink.addHyperlinkListener(new HyperlinkAdapter() {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.forms.events.HyperlinkAdapter#linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent)
+ */
+ @Override
+ public void linkActivated( final HyperlinkEvent e ) {
+ handleOpenCndPreferencesPage();
+ }
+ });
+ return hlink;
+ }
+ });
+ form.getToolBarManager().update(true);
}
/**
@@ -414,6 +442,11 @@
dialog.open();
}
+ void handleOpenCndPreferencesPage() {
+ PreferencesUtil.createPreferenceDialogOn(getShell(), JcrUiConstants.PreferenceIds.CND_PREFERENCE_PAGE,
+ new String[] { JcrUiConstants.PreferenceIds.CND_PREFERENCE_PAGE }, null).open();
+ }
+
/**
* Registers an editor activation listener.
*/
@@ -435,6 +468,7 @@
try {
createCnd();
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+ JcrPreferenceStore.get();
} catch (final Exception e) {
throw new PartInitException(CndMessages.errorOpeningCndEditor, e);
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndMessages.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndMessages.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/CndMessages.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -1011,6 +1011,11 @@
public static String openDeclaringNodeTypeToolTip;
/**
+ * A label of a hyperlink that opens the CND Editor preferences.
+ */
+ public static String openCndEditorPreferencesHyperlink;
+
+ /**
* A name for the orderable attribute suitable for a radio or check button.
*/
public static String orderableAttribute;
@@ -1021,6 +1026,16 @@
public static String orderableAttributeToolTip;
/**
+ * A label suitable for a preview control.
+ */
+ public static String previewLabel;
+
+ /**
+ * A message stating that preview is not available.
+ */
+ public static String previewNotAvailableMessage;
+
+ /**
* A label for a primary item control.
*/
public static String primaryItemLabel;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/cndMessages.properties
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/cndMessages.properties 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/cnd/cndMessages.properties 2012-04-18 19:59:01 UTC (rev 40305)
@@ -208,8 +208,11 @@
onParentVersionToolTip = Indicates what happens to the child node/property when the parent is created
openDeclaringNodeTypeMenuText = Open Declaring Node Type
openDeclaringNodeTypeToolTip = Open the declaring node type in the editor if that node type is in the CND being edited
+openCndEditorPreferencesHyperlink = Preferences
orderableAttribute = Orderable
orderableAttributeToolTip = Indicates if the node type definition's are ordered
+previewLabel = Preview:
+previewNotAvailableMessage = Preview not available
primaryItemLabel = Primary Item:
primaryItemToolTip = The child node or property made accessible via the API without having to know it's name
propertyAttributesToolTip = The attributes of a property definition (autocreated, mandatory, multiple, nofulltext, noqueryorder, abstract, opv, queryops)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/preferences/CndPreferencePage.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/preferences/CndPreferencePage.java 2012-04-18 19:57:10 UTC (rev 40304)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr.ui/src/org/jboss/tools/modeshape/jcr/ui/preferences/CndPreferencePage.java 2012-04-18 19:59:01 UTC (rev 40305)
@@ -7,6 +7,11 @@
*/
package org.jboss.tools.modeshape.jcr.ui.preferences;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
@@ -19,37 +24,63 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.modeshape.jcr.cnd.CndElement;
+import org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType;
+import org.jboss.tools.modeshape.jcr.cnd.CndImporter;
+import org.jboss.tools.modeshape.jcr.cnd.CompactNodeTypeDefinition;
import org.jboss.tools.modeshape.jcr.preference.JcrPreferenceConstants.CndPreference;
import org.jboss.tools.modeshape.jcr.preference.JcrPreferenceStore;
+import org.jboss.tools.modeshape.jcr.ui.Activator;
+import org.jboss.tools.modeshape.jcr.ui.JcrUiConstants;
import org.jboss.tools.modeshape.jcr.ui.JcrUiUtils;
import org.jboss.tools.modeshape.jcr.ui.cnd.CndMessages;
/**
- *
+ * The preference page that allows editing the settings of how CND files are formatted.
*/
public final class CndPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-//
-// private static String[] QUOTE_CHAR_LABELS = new String[] { CndMessages.quoteCharNoneChoiceLabel,
-// CndMessages.quoteCharSingleChoiceLabel, CndMessages.quoteCharDoubleChoiceLabel };
+ private static CompactNodeTypeDefinition _previewCnd;
+
/**
* The editor used to choose the notation type for the CND format.
*/
private Combo cbxNotationType;
-//
-// /**
-// * The editor used to choose the quote character.
-// */
-// private Combo cbxQuoteChar;
private String notationType;
-//
-// private String quoteString;
+ private Text txtPreview;
+
/**
+ * Constructs a CND preference page.
+ */
+ public CndPreferencePage() {
+ if (_previewCnd == null) {
+ _previewCnd = new CompactNodeTypeDefinition();
+
+ final String content = "<ex = 'http://namespace.com/ns'>\n" //$NON-NLS-1$
+ + "[ex:NodeType] > ex:ParentType1, ex:ParentType2 abstract orderable mixin noquery primaryitem ex:property\n" //$NON-NLS-1$
+ + "- ex:property (STRING) = 'default1', 'default2' mandatory autocreated protected multiple VERSION\n" //$NON-NLS-1$
+ + " queryops '=, <>, <, <=, >, >=, LIKE' nofulltext noqueryorder < 'constraint1', 'constraint2'" //$NON-NLS-1$
+ + "+ ex:node (ex:reqType1, ex:reqType2) = ex:defaultType mandatory autocreated protected sns version"; //$NON-NLS-1$
+
+ CndImporter importer = new CndImporter(true);
+ Collection<Throwable> problems = new ArrayList<Throwable>();
+
+ _previewCnd = importer.importFrom(content, problems, "string"); //$NON-NLS-1$
+
+ if (_previewCnd == null) {
+ for (Throwable e : problems) {
+ Activator.getSharedInstance().getLog().log(new Status(IStatus.ERROR, JcrUiConstants.PLUGIN_ID, null, e));
+ }
+ }
+ }
+ }
+
+ /**
* {@inheritDoc}
*
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
@@ -94,39 +125,19 @@
});
}
- { // quote chars
-// final Label lbl = new Label(panel, SWT.NONE);
-// lbl.setText(CndMessages.quoteCharPolicyLabel);
-//
-// this.cbxQuoteChar = new Combo(panel, SWT.NONE);
-// this.cbxQuoteChar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-// this.cbxQuoteChar.setItems(QUOTE_CHAR_LABELS);
-// this.cbxQuoteChar.setToolTipText(CndMessages.quoteCharPolicyToolTip);
-//
-// // set current value
-// this.quoteString = JcrPreferenceStore.get().get(CndPreference.QUOTE_CHAR);
-//
-// if (Utils.DOUBLE_QUOTE.equals(this.quoteString)) {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharDoubleChoiceLabel);
-// } else if (Utils.SINGLE_QUOTE.equals(this.quoteString)) {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharSingleChoiceLabel);
-// } else {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharNoneChoiceLabel);
-// }
-//
-// // add selection listener
-// this.cbxQuoteChar.addSelectionListener(new SelectionAdapter() {
-//
-// /**
-// * {@inheritDoc}
-// *
-// * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
-// */
-// @Override
-// public void widgetSelected( final SelectionEvent e ) {
-// handleQuotationCharacterChanged();
-// }
-// });
+ { // preview text
+ final Composite previewPanel = new Composite(parent, SWT.NONE);
+ previewPanel.setLayout(new GridLayout());
+ previewPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Label lblPreview = new Label(previewPanel, SWT.NONE);
+ lblPreview.setText(CndMessages.previewLabel);
+
+ this.txtPreview = new Text(previewPanel, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ this.txtPreview.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ this.txtPreview.setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND));
+ ((GridData)this.txtPreview.getLayoutData()).widthHint = convertWidthInCharsToPixels(120);
+ refreshPreview();
}
return panel;
@@ -171,20 +182,6 @@
public IPreferenceStore getPreferenceStore() {
return null;
}
-//
-// private String getQuoteStringFromSelection() {
-// final String quoteSelection = this.cbxQuoteChar.getText();
-//
-// if (CndMessages.quoteCharNoneChoiceLabel.equals(quoteSelection)) {
-// return Utils.EMPTY_STRING;
-// }
-//
-// if (CndMessages.quoteCharSingleChoiceLabel.equals(quoteSelection)) {
-// return Utils.SINGLE_QUOTE;
-// }
-//
-// return Utils.DOUBLE_QUOTE;
-// }
/**
* {@inheritDoc}
@@ -198,11 +195,8 @@
void handleNotationTypeChanged() {
this.notationType = this.cbxNotationType.getText();
+ refreshPreview();
}
-//
-// void handleQuotationCharacterChanged() {
-// this.quoteString = getQuoteStringFromSelection();
-// }
/**
* {@inheritDoc}
@@ -234,18 +228,6 @@
this.cbxNotationType.setText(defaultNotationType);
}
- { // quote character
-// final String quoteSelection = prefStore.getDefault(CndPreference.QUOTE_CHAR);
-//
-// if (Utils.EMPTY_STRING.equals(quoteSelection)) {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharNoneChoiceLabel);
-// } else if (Utils.SINGLE_QUOTE.equals(quoteSelection)) {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharSingleChoiceLabel);
-// } else {
-// this.cbxQuoteChar.setText(CndMessages.quoteCharDoubleChoiceLabel);
-// }
- }
-
super.performDefaults();
}
@@ -257,7 +239,14 @@
@Override
public boolean performOk() {
JcrPreferenceStore.get().set(CndPreference.NOTATION_TYPE, this.notationType);
-// JcrPreferenceStore.get().set(CndPreference.QUOTE_CHAR, this.quoteString);
return super.performOk();
}
+
+ private void refreshPreview() {
+ if (_previewCnd == null) {
+ this.txtPreview.setText(CndMessages.previewNotAvailableMessage);
+ } else {
+ this.txtPreview.setText(_previewCnd.toCndNotation(NotationType.valueOf(notationType)));
+ }
+ }
}
13 years, 11 months
JBoss Tools SVN: r40304 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 15:57:10 -0400 (Wed, 18 Apr 2012)
New Revision: 40304
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java
Log:
test template fixing to not import any project yet
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java 2012-04-18 19:56:20 UTC (rev 40303)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java 2012-04-18 19:57:10 UTC (rev 40304)
@@ -37,6 +37,16 @@
return "WSService";
}
+ @Override
+ public void setup() {
+
+ }
+
+ @Override
+ public void cleanup() {
+
+ }
+
/**
* 1 there are no incorrectly checked annotations
* 2 there are no incorrectly unchecked annotations
13 years, 11 months
JBoss Tools SVN: r40303 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-18 15:56:20 -0400 (Wed, 18 Apr 2012)
New Revision: 40303
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties
Log:
fix number of AS runtime in swtbot properties
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties 2012-04-18 19:42:39 UTC (rev 40302)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/properties/swtbot.properties 2012-04-18 19:56:20 UTC (rev 40303)
@@ -1,5 +1,5 @@
#SERVER=AS,6.0,default,../../../requirements/target/jboss-6.0.0.Final
#SERVER=AS,7.0,default,../../../requirements/target/jboss-as-web-7.0.2.Final
-SERVER=AS,7.0,default,../../../requirements/target/jboss-as-7.1.1.Final
+SERVER=AS,7.1,default,../../../requirements/target/jboss-as-7.1.1.Final
#SERVER=AS,7.1,default,/home/jjankovi/Dokumenty/Red_Hat_Stuff/Runtimes/jboss-as-7.1.1.Final
#SERVER=AS,6.0,default,/home/jjankovi/jboss-6.0.0.Final-WS
13 years, 11 months
JBoss Tools SVN: r40302 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-04-18 15:42:39 -0400 (Wed, 18 Apr 2012)
New Revision: 40302
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
Log:
/JBIDE-11555 compile error for juno. Backwards-compat tested.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2012-04-18 19:01:57 UTC (rev 40301)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2012-04-18 19:42:39 UTC (rev 40302)
@@ -165,7 +165,7 @@
ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
// VM-specific attributes
- Map<?, ?> vmAttributesMap = getVMSpecificAttributesMap(configuration);
+ Map<String, Object> vmAttributesMap = getVMSpecificAttributesMap(configuration);
// Classpath
String[] classpath = getClasspath(configuration);
13 years, 11 months