JBoss Tools SVN: r3152 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server/attributes and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-15 21:16:19 -0400 (Wed, 15 Aug 2007)
New Revision: 3152
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
Log:
Default shutdown poller switched to server process terminated poller, which waits until the process has finished.
Fixes JBIDE-747
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-08-15 17:06:33 UTC (rev 3151)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-08-16 01:16:19 UTC (rev 3152)
@@ -24,7 +24,6 @@
import java.util.Date;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerAttributes;
import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.model.EventLogModel;
@@ -81,8 +80,13 @@
protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean expectedState) {
JBossServer s = ServerConverter.getJBossServer(behavior.getServer());
ServerAttributeHelper helper = s.getAttributeHelper();
- String key = expectedState == IServerStatePoller.SERVER_UP ? IServerPollingAttributes.STARTUP_POLLER_KEY : IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
- String pollerId = helper.getAttribute(key, IServerPollingAttributes.DEFAULT_POLLER);
+ String key = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.STARTUP_POLLER_KEY :
+ IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
+ String defaultPoller = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.DEFAULT_STARTUP_POLLER :
+ IServerPollingAttributes.DEFAULT_SHUTDOWN_POLLER;
+ String pollerId = helper.getAttribute(key, defaultPoller);
ServerStatePollerType type = ExtensionManager.getDefault().getPollerType(pollerId);
return type == null ? null : type.createPoller();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-08-15 17:06:33 UTC (rev 3151)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-08-16 01:16:19 UTC (rev 3152)
@@ -28,7 +28,8 @@
public static final String TIMEOUT_BEHAVIOR = "org.jboss.ide.eclipse.as.core.server.attributes.timeoutBehavior";
public static final String STARTUP_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.startupPollerKey";
public static final String SHUTDOWN_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.shutdownPollerKey";
- public static final String DEFAULT_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
+ public static final String DEFAULT_STARTUP_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
+ public static final String DEFAULT_SHUTDOWN_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller";
public static final boolean TIMEOUT_ABORT = true;
public static final boolean TIMEOUT_IGNORE = false;
18 years, 4 months
JBoss Tools SVN: r3151 - in trunk/as/plugins: org.jboss.ide.eclipse.as.classpath.ui/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-15 13:06:33 -0400 (Wed, 15 Aug 2007)
New Revision: 3151
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/blank.gif
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
changing manifests to show proper name and provider
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/META-INF/MANIFEST.MF 2007-08-15 17:06:33 UTC (rev 3151)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Core Plug-in
+Bundle-Name: JBoss AS Classpath Core Plug-in
Bundle-SymbolicName: org.jboss.ide.eclipse.as.classpath.core;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin
@@ -16,3 +16,4 @@
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.classpath.core,
org.jboss.ide.eclipse.as.classpath.core.ejb3
+Bundle-Vendor: JBoss, a division of Red Hat
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF 2007-08-15 17:06:33 UTC (rev 3151)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Ui Plug-in
+Bundle-Name: JBoss AS Classpath Ui Plug-in
Bundle-SymbolicName: org.jboss.ide.eclipse.as.classpath.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.ide.eclipse.as.classpath.ui.ClasspathUIPlugin
@@ -13,3 +13,4 @@
org.eclipse.jdt.ui,
org.eclipse.jdt.core
Eclipse-LazyStart: true
+Bundle-Vendor: JBoss, a division of Red Hat
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-08-15 17:06:33 UTC (rev 3151)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Core Plug-in
+Bundle-Name: JBoss AS Core Plug-in
Bundle-SymbolicName: org.jboss.ide.eclipse.as.core;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.ide.eclipse.as.core.JBossServerCorePlugin
@@ -39,3 +39,4 @@
jaxen-1.1-beta-6.jar,
jbossascore.jar,
getopt.jar
+Bundle-Vendor: JBoss, a division of Red Hat
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-08-15 17:06:33 UTC (rev 3151)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Ui Plug-in
+Bundle-Name: JBoss AS Ui Plug-in
Bundle-SymbolicName: org.jboss.ide.eclipse.as.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Localization: plugin
@@ -60,3 +60,4 @@
org.jboss.ide.eclipse.as.ui.wizards
Bundle-ClassPath: jbossui.jar
Bundle-Activator: org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin
+Bundle-Vendor: JBoss, a division of Red Hat
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/blank.gif
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/blank.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/META-INF/MANIFEST.MF 2007-08-15 17:06:33 UTC (rev 3151)
@@ -25,3 +25,4 @@
org.jboss.ide.eclipse.ui
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.ui.mbeans.editors.proposals
+Bundle-Vendor: JBoss, a division of Red Hat
18 years, 4 months
JBoss Tools SVN: r3150 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-15 13:01:59 -0400 (Wed, 15 Aug 2007)
New Revision: 3150
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerPollerTimeoutListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathCategory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ConvertNodeToXPathDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
cleaning up of server and runtime wizards, movement of xpath initialization to server creation
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -25,12 +25,9 @@
import java.util.HashMap;
import java.util.Iterator;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
-import org.jboss.ide.eclipse.as.core.runtime.server.IServerPollerTimeoutListener;
-import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.runtime.server.ServerStatePollerType;
/**
@@ -45,36 +42,6 @@
return instance;
}
- private HashMap pollerListeners = null;
- public IServerPollerTimeoutListener[] getTimeoutListeners(String pollerClass) {
- if( pollerListeners == null )
- loadTimeoutListeners();
- ArrayList list = (ArrayList)pollerListeners.get(pollerClass);
- if( list != null ) {
- return (IServerPollerTimeoutListener[]) list.toArray(new IServerPollerTimeoutListener[list.size()]);
- }
- return new IServerPollerTimeoutListener[0];
- }
-
- protected void loadTimeoutListeners() {
- pollerListeners = new HashMap();
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(JBossServerCorePlugin.PLUGIN_ID, "pollerTimeoutListener");
- for( int i = 0; i < cf.length; i++ ) {
- try {
- String poller = cf[i].getAttribute("pollerType");
- Object listener = cf[i].createExecutableExtension("listener");
-
- ArrayList list = (ArrayList)pollerListeners.get(poller);
- if( list == null ) list = new ArrayList();
- list.add(listener);
- pollerListeners.put(poller, list);
- } catch( CoreException ce ) {
- ce.printStackTrace();
- }
- }
- }
-
private HashMap pollers;
public void loadPollers() {
pollers = new HashMap();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathCategory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathCategory.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathCategory.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -2,15 +2,15 @@
import java.util.HashMap;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
public class XPathCategory {
protected String name; // cannot include delimiter from the model, comma
- protected JBossServer server;
+ protected IServer server;
protected HashMap children;
- public XPathCategory(String name, JBossServer server) {
+ public XPathCategory(String name, IServer server) {
this.name = name;
this.server = server;
}
@@ -48,7 +48,7 @@
}
public void save() {
- ServerAttributeHelper helper = server.getAttributeHelper();
+ ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
XPathModel.getDefault().saveCategory(this, server, helper);
helper.save();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathModel.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathModel.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -12,9 +12,9 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.runtime.server.AbstractJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
public class XPathModel {
@@ -34,44 +34,38 @@
return instance;
}
- protected HashMap serverToCategories;
+ protected HashMap<String, ArrayList<XPathCategory>> serverToCategories;
public XPathModel() {
- serverToCategories = new HashMap();
+ serverToCategories = new HashMap<String, ArrayList<XPathCategory>>();
}
- public XPathQuery getQuery(JBossServer jbs, IPath path) {
- XPathCategory cat = getCategory(jbs, path.segment(0));
+ public XPathQuery getQuery(IServer server, IPath path) {
+ XPathCategory cat = getCategory(server, path.segment(0));
if( cat != null )
return cat.getQuery(path.segment(1));
return null;
}
- public ArrayList getCategoryCollection(JBossServer jbs) {
- if( serverToCategories.get(jbs.getServer().getId()) == null ) {
- ArrayList val = new ArrayList(Arrays.asList(load(jbs)));
- if( val.size() == 0 ) {
- val = loadDefaults(jbs);
- serverToCategories.put(jbs.getServer().getId(), val);
- save(jbs);
- } else {
- serverToCategories.put(jbs.getServer().getId(), val);
- }
+ public ArrayList<XPathCategory> getCategoryCollection(IServer server) {
+ if( serverToCategories.get(server.getId()) == null ) {
+ ArrayList<XPathCategory> val = new ArrayList<XPathCategory>(Arrays.asList(load(server)));
+ serverToCategories.put(server.getId(), val);
}
- return (ArrayList)serverToCategories.get(jbs.getServer().getId());
+ return (ArrayList<XPathCategory>)serverToCategories.get(server.getId());
}
- public XPathCategory[] getCategories(JBossServer jbs) {
- ArrayList val = getCategoryCollection(jbs);
+ public XPathCategory[] getCategories(IServer jbs) {
+ ArrayList<XPathCategory> val = getCategoryCollection(jbs);
return (XPathCategory[]) val.toArray(new XPathCategory[val.size()]);
}
- public boolean containsCategory(JBossServer jbs, String name) {
+ public boolean containsCategory(IServer jbs, String name) {
return getCategory(jbs, name) == null ? false : true;
}
- public XPathCategory getCategory(JBossServer jbs, String name) {
- ArrayList list = getCategoryCollection(jbs);
- Iterator i = list.iterator();
+ public XPathCategory getCategory(IServer jbs, String name) {
+ ArrayList<XPathCategory> list = getCategoryCollection(jbs);
+ Iterator<XPathCategory> i = list.iterator();
XPathCategory c;
while(i.hasNext()) {
c = (XPathCategory)i.next();
@@ -81,7 +75,7 @@
return null;
}
- public XPathCategory addCategory(JBossServer jbs, String name) {
+ public XPathCategory addCategory(IServer jbs, String name) {
if( !containsCategory(jbs, name)) {
XPathCategory c = new XPathCategory(name, jbs);
getCategoryCollection(jbs).add(c);
@@ -90,15 +84,15 @@
return getCategory(jbs, name);
}
- public void addCategory(JBossServer jbs, XPathCategory category) {
- if( !containsCategory(jbs, category.getName())) {
- getCategoryCollection(jbs).add(category);
+ public void addCategory(IServer server, XPathCategory category) {
+ if( !containsCategory(server, category.getName())) {
+ getCategoryCollection(server).add(category);
}
}
- public void removeCategory(JBossServer jbs, String name) {
- ArrayList list = getCategoryCollection(jbs);
- Iterator i = list.iterator();
+ public void removeCategory(IServer server, String name) {
+ ArrayList<XPathCategory> list = getCategoryCollection(server);
+ Iterator<XPathCategory> i = list.iterator();
while(i.hasNext()) {
XPathCategory cat = (XPathCategory)i.next();
if( cat.getName().equals(name)) {
@@ -111,38 +105,37 @@
/*
* Loading and saving is below
*/
- private XPathCategory[] load(JBossServer jbs) {
- ServerAttributeHelper helper = jbs.getAttributeHelper();
+ private XPathCategory[] load(IServer server) {
+ ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
String list = helper.getAttribute(CATEGORY_LIST, (String)null);
- System.out.println("load " + CATEGORY_LIST + ", got " + list);
if( list == null )
return new XPathCategory[] {};
String[] byName = list.split(DELIMITER);
XPathCategory[] cats = new XPathCategory[byName.length];
for( int i = 0; i < byName.length; i++ ) {
- cats[i] = new XPathCategory(byName[i], jbs);
+ cats[i] = new XPathCategory(byName[i], server);
}
return cats;
}
- public void save(JBossServer jbs) {
- if( !serverToCategories.containsKey(jbs.getServer().getId()))
+ public void save(IServer server) {
+ if( !serverToCategories.containsKey(server.getId()))
return;
- ServerAttributeHelper helper = jbs.getAttributeHelper();
- XPathCategory[] categories = getCategories(jbs);
+ ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
+ XPathCategory[] categories = getCategories(server);
String list = "";
for( int i = 0; i < categories.length; i++ ) {
if( i != 0 )
list += DELIMITER;
list += categories[i].getName();
- saveCategory(categories[i], jbs, helper);
+ saveCategory(categories[i], server, helper);
}
helper.setAttribute(CATEGORY_LIST, list);
helper.save();
}
- public void saveCategory(XPathCategory category, JBossServer jbs, ServerAttributeHelper helper) {
+ public void saveCategory(XPathCategory category, IServer server, ServerAttributeHelper helper) {
if( category.queriesLoaded()) {
XPathQuery[] queries = category.getQueries();
String val = "";
@@ -150,35 +143,31 @@
if( i != 0 )
val += DELIMITER;
val += category.getName() + Path.SEPARATOR + queries[i].getName();
- saveQuery(queries[i], category, jbs, helper);
+ saveQuery(queries[i], category, server, helper);
}
helper.setAttribute(QUERY_LIST + "." + category.getName().replace(' ', '_'), val);
- System.out.println("save " + QUERY_LIST + "." + category.getName() + " with " + val);
}
}
- private void saveQuery(XPathQuery query, XPathCategory category, JBossServer jbs, ServerAttributeHelper helper) {
- ArrayList list = new ArrayList();
+ private void saveQuery(XPathQuery query, XPathCategory category, IServer server, ServerAttributeHelper helper) {
+ ArrayList<String> list = new ArrayList<String>();
list.add(query.getBaseDir());
list.add(query.getFilePattern() == null ? EMPTY_STRING : query.getFilePattern());
list.add(query.getXpathPattern() == null ? EMPTY_STRING : query.getXpathPattern());
list.add(query.getAttribute() == null ? EMPTY_STRING : query.getAttribute());
helper.setAttribute(QUERY + "." + category.getName().replace(' ', '_') + Path.SEPARATOR + query.getName().replace(' ', '_'), list);
- System.out.println("saved " + QUERY + "." + category.getName() + Path.SEPARATOR + query.getName() + " with " + list);
}
- public XPathQuery[] loadQueries(XPathCategory category, JBossServer jbs) {
- ServerAttributeHelper helper = jbs.getAttributeHelper();
+ public XPathQuery[] loadQueries(XPathCategory category, IServer server) {
+ ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
String list = helper.getAttribute(QUERY_LIST + "." + category.getName().replace(' ', '_'), (String)null);
- System.out.println("load " + QUERY_LIST + "." + category.getName() + " gets " + list);
if( list == null )
return new XPathQuery[] {};
String[] queriesByName = list.split(DELIMITER);
- List queryAsStringValues;
- ArrayList returnList = new ArrayList();
+ List<String> queryAsStringValues;
+ ArrayList<XPathQuery> returnList = new ArrayList();
for( int i = 0; i < queriesByName.length; i++ ) {
queryAsStringValues = helper.getAttribute(QUERY + "." + queriesByName[i].replace(' ', '_'), (List)null);
- System.out.println("load " + QUERY + "." + queriesByName[i]);
if( queryAsStringValues != null ) {
try {
XPathQuery q =new XPathQuery(queriesByName[i].substring(queriesByName[i].indexOf(Path.SEPARATOR)+1), queryAsStringValues);
@@ -196,29 +185,28 @@
* Loading the defaults for the server
* returns the category created
*/
- private static HashMap rtToPortsFile;
+ private static HashMap<String, IPath> rtToPortsFile;
private static final String ATTRIBUTE_SUFFIX = "_ATTRIBUTE";
private static final String FILE_SUFFIX = "_FILE";
static {
- rtToPortsFile = new HashMap();
+ rtToPortsFile = new HashMap<String, IPath>();
rtToPortsFile.put("3.2", new Path("properties").append("jboss.32.default.ports.properties"));
rtToPortsFile.put("4.0", new Path("properties").append("jboss.40.default.ports.properties"));
rtToPortsFile.put("4.2", new Path("properties").append("jboss.42.default.ports.properties"));
rtToPortsFile.put("5.0", new Path("properties").append("jboss.50.default.ports.properties"));
}
- protected ArrayList loadDefaults(JBossServer jbs) {
- ArrayList retVal = new ArrayList();
- String configFolder;
- configFolder = jbs.getConfigDirectory(false); // do not check the launch config
+ public void loadDefaults(IServer server, String configFolder) {
+ ArrayList<XPathCategory> retVal = new ArrayList<XPathCategory>();
AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)
- jbs.getServer().getRuntime().loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
+ server.getRuntime().loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
Path p = (Path)rtToPortsFile.get(ajbsr.getId());
+ if( p == null ) return;
URL url = FileLocator.find(JBossServerCorePlugin.getDefault().getBundle(), p, null);
Properties pr = new Properties();
try {
pr.load(url.openStream());
- XPathCategory ports = new XPathCategory("Ports", jbs);
+ XPathCategory ports = new XPathCategory("Ports", server);
Iterator i = pr.keySet().iterator();
String name, xpath, attributeName, file;
XPathQuery query;
@@ -236,6 +224,8 @@
} catch( Exception e ) {
e.printStackTrace();
}
- return retVal;
+
+ serverToCategories.put(server.getId(), retVal);
+ //save(server);
}
}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerPollerTimeoutListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerPollerTimeoutListener.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerPollerTimeoutListener.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -1,28 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, 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.jboss.ide.eclipse.as.core.runtime.server;
-
-import org.eclipse.wst.server.core.IServer;
-
-public interface IServerPollerTimeoutListener {
- public void serverTimedOut(IServer server, boolean expectedState);
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -59,12 +59,9 @@
public JBossServer() {
}
-
protected void initialize() {
-
}
-
public void setDefaults(IProgressMonitor monitor) {
}
@@ -77,13 +74,11 @@
public void configurationChanged() {
}
-
public IJBossServerLaunchDefaults getLaunchDefaults() {
return new ServerLaunchDefaults(getServer());
}
-
/*
* Abstracts to implement
*/
@@ -198,7 +193,7 @@
protected int findPort(IPath path) {
try {
- XPathQuery query = XPathModel.getDefault().getQuery(this, path);
+ XPathQuery query = XPathModel.getDefault().getQuery(getServer(), path);
String result = query.getFirstResult();
if( result != null ) {
return Integer.parseInt(result);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -29,6 +29,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
/**
@@ -39,6 +40,16 @@
*/
public class ServerAttributeHelper {
+ public static ServerAttributeHelper createHelper(IServer iserver) {
+ if( iserver instanceof Server ) {
+ IServerWorkingCopy copy = ((Server)iserver).createWorkingCopy();
+ if( copy != null ) {
+ return new ServerAttributeHelper(iserver, copy);
+ }
+ }
+ return null;
+ }
+
private ServerWorkingCopy wch;
private IServer server;
public ServerAttributeHelper(IServer server, IServerWorkingCopy copy) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -7,13 +7,10 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.IModuleVisitor;
import org.eclipse.wst.server.core.internal.ProgressUtil;
import org.eclipse.wst.server.core.internal.Server;
@@ -135,7 +132,6 @@
// Basically stolen from RunOnServerActionDelegate
public IStatus publishOneModule(int kind, IModule[] module, int deltaKind, IProgressMonitor monitor) {
- addAndRemoveModules( module, deltaKind);
ArrayList moduleList = new ArrayList();
ArrayList deltaKindList = new ArrayList();
moduleList.add(module);
@@ -177,19 +173,19 @@
return Status.CANCEL_STATUS;
}
- protected void addAndRemoveModules(IModule[] module, int deltaKind) {
- if( getServer() == null ) return;
- boolean contains = ServerUtil.containsModule(getServer(), module[0], new NullProgressMonitor());
- try {
- if( !contains && (deltaKind == ServerBehaviourDelegate.ADDED) || (deltaKind == ServerBehaviourDelegate.CHANGED)) {
- IServerWorkingCopy wc = getServer().createWorkingCopy();
- ServerUtil.modifyModules(wc, module, new IModule[0], new NullProgressMonitor());
- wc.save(false, new NullProgressMonitor());
- } else if( contains && deltaKind == ServerBehaviourDelegate.REMOVED) {
- IServerWorkingCopy wc = getServer().createWorkingCopy();
- ServerUtil.modifyModules(wc, new IModule[0], module, new NullProgressMonitor());
- wc.save(false, new NullProgressMonitor());
- }
- } catch( Exception e ) {} // swallowed
- }
+// protected void addAndRemoveModules(IModule[] module, int deltaKind) {
+// if( getServer() == null ) return;
+// boolean contains = ServerUtil.containsModule(getServer(), module[0], new NullProgressMonitor());
+// try {
+// if( !contains && (deltaKind == ServerBehaviourDelegate.ADDED) || (deltaKind == ServerBehaviourDelegate.CHANGED)) {
+// IServerWorkingCopy wc = getServer().createWorkingCopy();
+// ServerUtil.modifyModules(wc, module, new IModule[0], new NullProgressMonitor());
+// wc.save(false, new NullProgressMonitor());
+// } else if( contains && deltaKind == ServerBehaviourDelegate.REMOVED) {
+// IServerWorkingCopy wc = getServer().createWorkingCopy();
+// ServerUtil.modifyModules(wc, new IModule[0], module, new NullProgressMonitor());
+// wc.save(false, new NullProgressMonitor());
+// }
+// } catch( Exception e ) {} // swallowed
+// }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-08-15 17:01:59 UTC (rev 3150)
@@ -11,7 +11,7 @@
behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
class="org.jboss.ide.eclipse.as.core.server.JBossServer"
description="%jboss.version.32.description"
- hasConfiguration="true"
+ hasConfiguration="false"
id="org.jboss.ide.eclipse.as.32"
initialState="stopped"
launchConfigId="org.jboss.ide.eclipse.as.core.server.launchConfiguration"
@@ -28,7 +28,7 @@
behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
class="org.jboss.ide.eclipse.as.core.server.JBossServer"
description="%jboss.version.40.description"
- hasConfiguration="true"
+ hasConfiguration="false"
id="org.jboss.ide.eclipse.as.40"
initialState="stopped"
launchConfigId="org.jboss.ide.eclipse.as.core.server.launchConfiguration"
@@ -45,7 +45,7 @@
behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
class="org.jboss.ide.eclipse.as.core.server.JBossServer"
description="%jboss.version.42.description"
- hasConfiguration="true"
+ hasConfiguration="false"
id="org.jboss.ide.eclipse.as.42"
initialState="stopped"
launchConfigId="org.jboss.ide.eclipse.as.core.server.launchConfiguration"
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-08-15 17:01:59 UTC (rev 3150)
@@ -51,7 +51,7 @@
org.eclipse.wst.ws.ui,
org.apache.ant,
org.jboss.ide.eclipse.as.core,
- org.jboss.ide.eclipse.firstrun,
+ org.jboss.ide.eclipse.firstrun;resolution:=optional,
org.jboss.ide.eclipse.archives.core,
org.jboss.ide.eclipse.archives.ui
Eclipse-LazyStart: true
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -42,7 +42,9 @@
public static final String WIZBAN_JBOSS32_LOGO = "jboss32logo";
public static final String WIZBAN_JBOSS40_LOGO = "jboss40logo";
public static final String WIZBAN_JBOSS42_LOGO = "jboss42logo";
+ public static final String WIZBAN_DEPLOY_ONLY_LOGO = "jbossdeployerlogo";
+
public static final String TWIDDLE_IMAGE = "TWIDDLE_IMAGE";
public static final String INACTIVE_CATEGORY_IMAGE = "INACTIVE_CATEGORY_IMAGE";
public static final String GENERIC_SERVER_IMAGE = "GENERIC_SERVER_IMAGE";
@@ -54,8 +56,7 @@
private Hashtable images, descriptors;
- private JBossServerUISharedImages ()
- {
+ private JBossServerUISharedImages () {
instance = this;
images = new Hashtable();
descriptors = new Hashtable();
@@ -67,7 +68,7 @@
descriptors.put(WIZBAN_JBOSS32_LOGO, createImageDescriptor(pluginBundle, "/icons/logo32.gif"));
descriptors.put(WIZBAN_JBOSS40_LOGO, createImageDescriptor(pluginBundle, "/icons/logo40.gif"));
descriptors.put(WIZBAN_JBOSS42_LOGO, createImageDescriptor(pluginBundle, "/icons/logo42.gif"));
-
+ descriptors.put(WIZBAN_DEPLOY_ONLY_LOGO, createImageDescriptor(pluginBundle, "/icons/blank.gif"));
descriptors.put(TWIDDLE_IMAGE, createImageDescriptor(pluginBundle, "icons/twiddle.gif"));
descriptors.put(INACTIVE_CATEGORY_IMAGE, createImageDescriptor(pluginBundle, "/icons/inactiveCat.gif"));
descriptors.put(PUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/publish.gif"));
@@ -81,7 +82,6 @@
images.put(key, descriptor.createImage());
}
-
images.put(GENERIC_SERVER_IMAGE, ImageResource.getImageDescriptor(ImageResource.IMG_CTOOL_NEW_SERVER).createImage());
descriptors.put(GENERIC_SERVER_IMAGE, ImageDescriptor.createFromImage((Image)images.get(GENERIC_SERVER_IMAGE)));
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ConvertNodeToXPathDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ConvertNodeToXPathDialog.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ConvertNodeToXPathDialog.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -46,12 +46,12 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathCategory;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathModel;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathQuery;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathDialog;
import org.w3c.dom.NamedNodeMap;
@@ -280,16 +280,16 @@
ConvertNodeToXPathDialog d = new ConvertNodeToXPathDialog(new Shell(), node, attributeName);
int result = -1;
try {
- result = d.open();
+ result = d.open();
} catch(Exception e) {e.printStackTrace(); }
if( result == Window.OK) {
- JBossServer s = d.getServer();
+ IServer s = d.getServer();
String category = d.getCategory();
XPathCategory cat = XPathModel.getDefault().getCategory(s, category);
if( cat == null ) {
cat = XPathModel.getDefault().addCategory(s, category);
}
- XPathQuery q = new XPathQuery(d.getName(), s.getConfigDirectory(), null, d.getXpath(), d.getAttribute());
+ XPathQuery q = new XPathQuery(d.getName(), XPathDialogs.getConfigFolder(s), null, d.getXpath(), d.getAttribute());
cat.addQuery(q);
cat.save();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -28,6 +28,7 @@
import java.util.TreeSet;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
@@ -62,6 +63,7 @@
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.model.descriptor.XMLDocumentRepository;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathCategory;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathFileResult;
@@ -69,7 +71,6 @@
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathQuery;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathFileResult.XPathResultNode;
import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.XPathPropertyLabelProvider;
@@ -83,15 +84,15 @@
private String initialName;
private String currentText;
- private JBossServer jbs;
+ private IServer server;
private Label errorLabel;
- public XPathCategoryDialog(Shell parentShell, JBossServer jbs) {
+ public XPathCategoryDialog(Shell parentShell, IServer server) {
super(parentShell);
- this.jbs = jbs;
+ this.server = server;
}
- public XPathCategoryDialog(Shell parentShell, JBossServer jbs, String initialName) {
- this(parentShell, jbs);
+ public XPathCategoryDialog(Shell parentShell, IServer server, String initialName) {
+ this(parentShell, server);
this.initialName = initialName;
}
@@ -142,7 +143,7 @@
}
private void verifyText(String text) {
- boolean valid = !XPathModel.getDefault().containsCategory(jbs, text) || (initialName != null && initialName.equals(text));
+ boolean valid = !XPathModel.getDefault().containsCategory(server, text) || (initialName != null && initialName.equals(text));
if( valid ) {
errorLabel.setVisible(false);
currentText = text;
@@ -168,7 +169,7 @@
protected XPathProposalProvider proposalProvider;
- protected JBossServer server;
+ protected IServer server;
protected String name, xpath, attribute, category;
protected String originalName = null;
protected XPathQuery original = null;
@@ -183,14 +184,14 @@
public XPathDialog(Shell parentShell) {
this(parentShell, null);
}
- public XPathDialog(Shell parentShell, JBossServer server) {
+ public XPathDialog(Shell parentShell, IServer server) {
this(parentShell, server, null);
}
- public XPathDialog(Shell parentShell, JBossServer server, String categoryName) {
+ public XPathDialog(Shell parentShell, IServer server, String categoryName) {
this(parentShell, server, categoryName, null);
}
- public XPathDialog(Shell parentShell, JBossServer server, String categoryName, String originalName) {
+ public XPathDialog(Shell parentShell, IServer server, String categoryName, String originalName) {
super(parentShell);
setShellStyle(getShellStyle() | SWT.RESIZE);
this.category = categoryName;
@@ -233,22 +234,19 @@
if( xpath != null ) xpathText.setText(xpath);
proposalProvider = new XPathProposalProvider(repository);
- proposalProvider.setServer(server);
+ proposalProvider.setPath(getConfigFolder(server));
ContentProposalAdapter adapter = new
ContentProposalAdapter(xpathText, new TextContentAdapter(),
proposalProvider, null, null);
-
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
XPathAttributeProposalProvider provider2 = new XPathAttributeProposalProvider(repository, xpathText);
- provider2.setServer(server);
+ provider2.setPath(getConfigFolder(server));
ContentProposalAdapter adapter2 = new
ContentProposalAdapter(attributeText, new TextContentAdapter(),
provider2, null, null);
adapter2.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
return main;
}
@@ -301,10 +299,10 @@
public void widgetSelected(SelectionEvent e) {
int index = serverCombo.getSelectionIndex();
String val = serverCombo.getItem(index);
- JBossServer[] serverList = ServerConverter.getAllJBossServers();
- for( int i = 0; i < serverList.length; i++ ) {
- if( serverList[i].getServer().getName().equals(val)) {
- setServer(serverList[i]);
+ IServer[] list = ServerCore.getServers();
+ for( int i = 0; i < list.length; i++ ) {
+ if( list[i].getName().equals(val)) {
+ setServer(list[i]);
return;
}
}
@@ -380,7 +378,7 @@
return Messages.XPathNameEmpty;
}
if( server == null ) return null;
- XPathCategory[] categories = XPathModel.getDefault().getCategories((JBossServer)server);
+ XPathCategory[] categories = XPathModel.getDefault().getCategories(server);
XPathCategory category = null;
for( int i = 0; i < categories.length; i++ ) {
if( categories[i].getName().equals(this.category))
@@ -401,9 +399,9 @@
}
- protected void setServer(JBossServer s) {
+ protected void setServer(IServer s) {
server = s;
- proposalProvider.setServer(s);
+ proposalProvider.setPath(getConfigFolder(s));
refreshCategoryCombo();
checkErrors();
}
@@ -428,7 +426,7 @@
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
final IProgressMonitor monitor2 = monitor;
- XPathQuery tmp = new XPathQuery("", server.getConfigDirectory(), null, xpathText.getText(), attributeText.getText());
+ XPathQuery tmp = new XPathQuery("", getConfigFolder(server), null, xpathText.getText(), attributeText.getText());
tmp.setRepository(repository);
final ArrayList list = new ArrayList();
list.addAll(Arrays.asList(tmp.getResults()));
@@ -627,7 +625,7 @@
public String getCategory() {
return category;
}
- public JBossServer getServer() {
+ public IServer getServer() {
return server;
}
@@ -681,7 +679,7 @@
}
public static class XPathProposalProvider implements IContentProposalProvider {
-
+
protected static final int NEW_ELEMENT = 1;
protected static final int NEW_ATTRIBUTE = 2;
protected static final int NEW_ATTRIBUTE_VALUE = 3;
@@ -690,8 +688,7 @@
protected static final int IN_ATTRIBUTE_VALUE = 6;
protected static final int CLOSE_ATTRIBUTE = 7;
-
- private IDeployableServer server;
+ private String path;
private HashMap xpathCache;
protected XMLDocumentRepository repository;
@@ -699,9 +696,11 @@
xpathCache = new HashMap();
this.repository = repository;
}
- public void setServer(IDeployableServer server) {
- this.server = server;
+
+ public void setPath(String path) {
+ this.path = path;
}
+
public IContentProposal[] getProposals(String contents, int position) {
if( contents.equals("") || contents.equals("/") || contents.equals(" ")) {
return new IContentProposal[] { new XPathContentProposal("/server/", "/server/".length(), null, null)};
@@ -720,14 +719,14 @@
}
protected XPathResultNode[] getXPath(String xpath) {
- if( server == null )
+ if( path == null )
return new XPathResultNode[0];
if( xpathCache.containsKey(xpath)) {
ArrayList list = (ArrayList)xpathCache.get(xpath);
return (XPathResultNode[]) list.toArray(new XPathResultNode[list.size()]);
}
- XPathQuery tmp = new XPathQuery("", server.getConfigDirectory(), "**/*.xml", xpath, null);
+ XPathQuery tmp = new XPathQuery("", path, "**/*.xml", xpath, null);
tmp.setRepository(repository);
ArrayList list = new ArrayList();
XPathFileResult[] items = tmp.getResults();
@@ -774,9 +773,11 @@
String[] props = getAttributeNameProposalStrings(parent, path.substring(attName+1));
return convertProposals(props);
}
+
public IContentProposal[] getAttributeNameProposals(String parentPath, String remainder) {
return convertProposals(getAttributeNameProposalStrings(parentPath, remainder));
}
+
public String[] getAttributeNameProposalStrings(String parentPath, String remainder) {
ArrayList names = new ArrayList();
XPathResultNode[] items = getXPath(parentPath);
@@ -799,6 +800,7 @@
public IContentProposal[] getAttributeValueProposals(String path) {
return getAttributeValueProposals(path.substring(0, path.lastIndexOf('=')), path.substring(path.lastIndexOf('=')+1));
}
+
public IContentProposal[] getAttributeValueProposals(String parentPath, String remainder) {
String parentElementPath = parentPath.substring(0, parentPath.lastIndexOf('['));
int brackIndex = parentPath.lastIndexOf('[');
@@ -887,4 +889,13 @@
}
}
}
+
+ public static String getConfigFolder(IServer server) {
+ JBossServer jbs = (JBossServer)server.loadAdapter(JBossServer.class, new NullProgressMonitor());
+ if( jbs != null ) {
+ return jbs.getConfigDirectory();
+ }
+ return server.getRuntime().getLocation().toOSString();
+ //return null;
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -54,8 +54,6 @@
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathModel;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathQuery;
import org.jboss.ide.eclipse.as.core.model.descriptor.XPathFileResult.XPathResultNode;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs;
import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathCategoryDialog;
@@ -75,7 +73,6 @@
editXPathAction, deleteXPathAction, editFileAction;
private IServer server;
- private JBossServer jbServer;
private XPathCategory activeCategory;
private Object selectedPropertyObject;
@@ -121,6 +118,7 @@
IWorkbenchWindow window = work.getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
IViewReference ref = window.getActivePage().findViewReference(propsId);
+ if( ref == null ) return false;
IWorkbenchPart part = ref.getPart(false);
return ( part != null && page.isPartVisible(part));
}
@@ -146,8 +144,8 @@
public Object[] getChildren(Object parentElement) {
if( parentElement instanceof ServerViewProvider ) {
- if( jbServer == null ) return new Object[]{};
- return XPathModel.getDefault().getCategories(jbServer);
+ if( server == null ) return new Object[]{};
+ return XPathModel.getDefault().getCategories(server);
}
return new Object[0];
}
@@ -165,7 +163,6 @@
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if( oldInput != newInput ) {
server = (IServer)newInput;
- jbServer = server == null ? null : ServerConverter.getJBossServer(server);
}
}
}
@@ -199,11 +196,11 @@
public void createActions() {
newXPathCategoryAction = new Action() {
public void run() {
- XPathCategoryDialog d = new XPathDialogs.XPathCategoryDialog(
- Display.getCurrent().getActiveShell(), jbServer);
+ XPathCategoryDialog d = new XPathCategoryDialog(
+ Display.getCurrent().getActiveShell(), server);
if( d.open() == Window.OK ) {
- XPathModel.getDefault().addCategory(jbServer, d.getText());
- XPathModel.getDefault().save(jbServer);
+ XPathModel.getDefault().addCategory(server, d.getText());
+ XPathModel.getDefault().save(server);
refreshViewer();
}
}
@@ -217,8 +214,8 @@
messageBox.setText (Messages.DescriptorXPathRemoveCategory + "?");
messageBox.setMessage (Messages.DescriptorXPathRemoveCategoryDesc);
if( messageBox.open () == SWT.YES ) {
- XPathModel.getDefault().removeCategory(jbServer, getActiveCategory().getName());
- XPathModel.getDefault().save(jbServer);
+ XPathModel.getDefault().removeCategory(server, getActiveCategory().getName());
+ XPathModel.getDefault().save(server);
setActiveCategory(null);
refreshViewer();
}
@@ -232,18 +229,18 @@
XPathCategory category = getActiveCategory();
if( category != null ) {
String categoryName = category.getName();
- XPathDialog d = new XPathDialog(Display.getCurrent().getActiveShell(), jbServer, categoryName);
+ XPathDialog d = new XPathDialog(Display.getCurrent().getActiveShell(), server, categoryName);
if( d.open() == Window.OK ) {
- XPathCategory[] categoryList = XPathModel.getDefault().getCategories(jbServer);
+ XPathCategory[] categoryList = XPathModel.getDefault().getCategories(server);
XPathCategory categoryItem = null;
for( int i = 0; i < categoryList.length; i++ ) {
if( categoryList[i].getName().equals(category.getName()))
categoryItem = categoryList[i];
}
if( categoryItem != null ) {
- XPathQuery query = new XPathQuery(d.getName(), jbServer.getConfigDirectory(), null, d.getXpath(), d.getAttribute());
+ XPathQuery query = new XPathQuery(d.getName(), XPathDialogs.getConfigFolder(server), null, d.getXpath(), d.getAttribute());
categoryItem.addQuery(query);
- XPathModel.getDefault().save(jbServer);
+ XPathModel.getDefault().save(server);
refreshViewer();
}
}
@@ -260,7 +257,7 @@
XPathCategory category = original.getCategory();
XPathDialog d = new XPathDialog(Display.getCurrent().getActiveShell(),
- jbServer, category.getName(), original.getName());
+ server, category.getName(), original.getName());
d.setAttribute(original.getAttribute());
d.setXpath(original.getXpathPattern());
@@ -341,6 +338,10 @@
}
}
+ protected boolean supports(IServer server) {
+ return true;
+ }
+
// Property Sheet Page
public IPropertySheetPage getPropertySheetPage() {
if( propertyPage == null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -33,8 +33,6 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerLifecycleListener;
@@ -42,6 +40,7 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.ServerEvent;
+import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
@@ -57,15 +56,11 @@
private ModuleContentProvider contentProvider;
private ModuleLabelProvider labelProvider;
-
- private Action deleteModuleAction, publishModuleAction;
-
+ private Action deleteModuleAction, fullPublishModuleAction, incrementalPublishModuleAction;
private ModuleServer selection;
-
private IServerLifecycleListener serverResourceListener;
private IServerListener serverListener;
-
public ModuleViewProvider() {
contentProvider = new ModuleContentProvider();
labelProvider = new ModuleLabelProvider();
@@ -78,13 +73,16 @@
public void run() {
if (MessageDialog.openConfirm(new Shell(), Messages.ServerDialogHeading, Messages.DeleteModuleConfirm)) {
try {
- IServerWorkingCopy wc = selection.server.createWorkingCopy();
- wc.modifyModules(null, selection.module , null);
- wc.save(true, null);
- // Re-publish in case the configuration change has not been published yet.
- DeployableServerBehavior behavior = (DeployableServerBehavior)
- contentProvider.getServer().loadAdapter(DeployableServerBehavior.class, new NullProgressMonitor());
- behavior.publishOneModule(IServer.PUBLISH_FULL, selection.module, ServerBehaviourDelegate.REMOVED, new NullProgressMonitor());
+ IServerWorkingCopy server = selection.server.createWorkingCopy();
+ ServerUtil.modifyModules(server, null, selection.module, new NullProgressMonitor());
+ IServer server2 = server.save(true, null);
+
+ if( ServerConverter.getDeployableServer(selection.server) != null ) {
+ ServerConverter.getDeployableServerBehavior(selection.server)
+ .publishOneModule(IServer.PUBLISH_FULL, selection.module, ServerBehaviourDelegate.REMOVED, new NullProgressMonitor());
+ } else {
+ server2.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor());
+ }
} catch (Exception e) {
// ignore
}
@@ -95,24 +93,47 @@
deleteModuleAction.setDescription(Messages.DeleteModuleDescription);
deleteModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.UNPUBLISH_IMAGE));
- publishModuleAction = new Action() {
+ fullPublishModuleAction = new Action() {
public void run() {
- DeployableServerBehavior behavior = (DeployableServerBehavior)
- contentProvider.getServer().loadAdapter(DeployableServerBehavior.class, new NullProgressMonitor());
- if( behavior != null )
- behavior.publishOneModule(IServer.PUBLISH_FULL, selection.module, ServerBehaviourDelegate.CHANGED, new NullProgressMonitor());
+ actionPublish(IServer.PUBLISH_FULL);
}
};
- publishModuleAction.setText(Messages.PublishModuleText);
- publishModuleAction.setDescription(Messages.PublishModuleDescription);
- publishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
+ fullPublishModuleAction.setText(Messages.PublishModuleText);
+ fullPublishModuleAction.setDescription(Messages.PublishModuleDescription);
+ fullPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
+
+
+ incrementalPublishModuleAction = new Action() {
+ public void run() {
+ actionPublish(IServer.PUBLISH_INCREMENTAL);
+ }
+ };
+ incrementalPublishModuleAction.setText("Incremental Publish");
+ incrementalPublishModuleAction.setDescription(Messages.PublishModuleDescription);
+ incrementalPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
+}
+
+ protected void actionPublish(int type) {
+ try {
+ if( ServerConverter.getDeployableServer(selection.server) != null ) {
+ ServerConverter.getDeployableServerBehavior(selection.server)
+ .publishOneModule(type, selection.module,
+ ServerBehaviourDelegate.CHANGED, new NullProgressMonitor());
+ } else {
+ selection.server.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor());
+ }
+ } catch( Exception e ) {
+ // ignore
+ }
}
+
public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
if( selection instanceof ModuleServer) {
this.selection = (ModuleServer)selection;
menu.add(deleteModuleAction);
- menu.add(publishModuleAction);
+ menu.add(fullPublishModuleAction);
+ menu.add(incrementalPublishModuleAction);
}
}
@@ -269,7 +290,5 @@
servers[i].getServer().addServerListener(serverListener);
}
}
-
-
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-08-15 17:01:59 UTC (rev 3150)
@@ -2,11 +2,9 @@
import java.io.File;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -27,12 +25,12 @@
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.TaskModel;
import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.stripped.DeployableServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
public class StrippedServerWizardFragment extends WizardFragment {
@@ -43,6 +41,7 @@
private Text deployText, nameText;
private Button browse;
private String name, deployLoc;
+
public StrippedServerWizardFragment() {
}
@@ -50,17 +49,14 @@
this.handle = handle;
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
-
-
-
-
+
nameLabel = new Label(main, SWT.NONE);
nameText = new Text(main, SWT.BORDER);
nameLabel.setText("Server Name");
deployLabel = new Label(main, SWT.NONE);
deployText = new Text(main, SWT.BORDER);
- Button browse = new Button(main, SWT.PUSH);
+ browse = new Button(main, SWT.PUSH);
deployLabel.setText(Messages.deployDirectory);
browse.setText(Messages.browse);
@@ -85,12 +81,7 @@
nametData.left = new FormAttachment(deployLabel,5);
nametData.right = new FormAttachment(100,-5);
nameText.setLayoutData(nametData);
-
-
-
-
-
FormData bData = new FormData();
bData.right = new FormAttachment(100,-5);
bData.top = new FormAttachment(nameText,5);
@@ -114,13 +105,10 @@
}
});
-
deployText.addModifyListener(ml);
nameText.addModifyListener(ml);
-
nameText.setText(getDefaultNameText());
-
-
+ handle.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.WIZBAN_DEPLOY_ONLY_LOGO));
return main;
}
@@ -184,26 +172,14 @@
IServerWorkingCopy serverWC = (IServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
ServerWorkingCopy serverwc2 = (serverWC instanceof ServerWorkingCopy ? ((ServerWorkingCopy)serverWC) : null);
- IFolder folder = getJbossServerFolder(name);
- if( !folder.exists()) {
- folder.create(true,true, new NullProgressMonitor());
- }
try {
- serverwc2.setServerConfiguration(folder);
+ serverwc2.setServerConfiguration(null);
serverwc2.setName(name);
serverwc2.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
- IServer saved = serverwc2.save(true, monitor);
- getTaskModel().putObject(TaskModel.TASK_SERVER, saved);
+ getTaskModel().putObject(TaskModel.TASK_SERVER, serverwc2);
} catch( Exception ce ) {
}
}
- private IFolder getJbossServerFolder(String serverName) {
- try {
- return ServerType.getServerProject().getFolder(serverName);
- } catch( Exception e) {
- return null;
- }
- }
public boolean isComplete() {
return checkErrors().isOK();
@@ -212,19 +188,16 @@
public boolean hasComposite() {
return true;
}
-
-
-
-
private String getDefaultNameText() {
String base = "JBoss deployer";
if( findServer(base) == null ) return base;
int i = 1;
- while( ServerCore.findServer(base + " " + i) != null )
+ while( ServerCore.findServer(base + " (" + i + ")") != null )
i++;
- return base + " " + i;
+ return base + " (" + i + ")";
}
+
private IServer findServer(String name) {
IServer[] servers = ServerCore.getServers();
for( int i = 0; i < servers.length; i++ ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-08-15 17:01:23 UTC (rev 3149)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-08-15 17:01:59 UTC (rev 3150)
@@ -107,24 +107,6 @@
- <extension
- id="org.jboss.ide.eclipse.as.ui.actionSet"
- name="JBoss AS"
- point="org.eclipse.ui.actionSets">
- <actionSet
- id="org.jboss.ide.eclipse.as.ui.actionSet.workbenchMenu"
- label="JBoss AS"
- visible="true">
- <action
- class="org.jboss.ide.eclipse.as.ui.actions.ServerPulldownDelegate"
- icon="icons/jboss.gif"
- id="org.jboss.ide.eclipse.as.ui.actions.ServerPulldownShortcut"
- label="JBoss AS Menu"
- style="pulldown"
- toolbarPath="Normal/additions"
- tooltip="Start Server"/>
- </actionSet>
- </extension>
18 years, 4 months
JBoss Tools SVN: r3149 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-15 13:01:23 -0400 (Wed, 15 Aug 2007)
New Revision: 3149
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
cleaning up of server and runtime wizards, movement of xpath initialization to server creation
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-08-15 16:04:48 UTC (rev 3148)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-08-15 17:01:23 UTC (rev 3149)
@@ -21,16 +21,12 @@
*/
package org.jboss.ide.eclipse.as.ui.wizards;
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
@@ -39,12 +35,11 @@
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
@@ -54,75 +49,36 @@
import org.eclipse.wst.server.core.TaskModel;
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.jboss.ide.eclipse.as.core.model.descriptor.XPathModel;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.runtime.server.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
public class JBossServerWizardFragment extends WizardFragment {
- //private final static int UNKNOWN_CHANGED = 0;
- private final static int NAME_CHANGED = 1;
- private final static int HOME_CHANGED = 2;
- private final static int JRE_CHANGED = 3;
- private final static int CONFIG_CHANGED = 4;
-
- private final static int SEVERITY_ALL = 1;
- private final static int SEVERITY_MAJOR = 2;
-
private IWizardHandle handle;
- private Label nameLabel, homeDirLabel, installedJRELabel, configLabel, explanationLabel;
- private Text nameText, homeDirText, configText;
- private Combo jreCombo;
- private Composite nameComposite, homeDirComposite, jreComposite, configComposite;
+ private Label nameLabel, explanationLabel;
+ private Label homeDirLabel, installedJRELabel, configLabel;
+ private Label homeValLabel, jreValLabel, configValLabel;
+ private String runtimeLoc, configName;
+
+ private Composite nameComposite;
private Group g;
- private String name, config;
-
- // jre fields
- protected ArrayList installedJREs;
- protected String[] jreNames;
- protected int defaultVMIndex;
-
+ private String name;
+ private Text nameText;
- private IVMInstall selectedVM;
- private JBossServer server;
- private IJBossServerRuntime runtime;
-
-
-
- protected void debug (String message)
- {
- System.out.println("[jboss-wizard-fragment] " + message);
- }
-
- public Composite createComposite(Composite parent, IWizardHandle handle)
- {
+ public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
-
- updateJREs();
createExplanationLabel(main);
createNameComposite(main);
-
- g = new Group(main, SWT.NONE);
- g.setText(Messages.runtimeInformation);
- g.setLayout(new FormLayout());
- FormData groupData = new FormData();
- groupData.left = new FormAttachment(0,5);
- groupData.right = new FormAttachment(100, -5);
- groupData.top = new FormAttachment(nameComposite, 5);
- g.setLayoutData(groupData);
-
- createHomeComposite(g);
- createJREComposite(g);
- createConfigurationComposite(g);
+ createRuntimeGroup(main);
// make modifications to parent
handle.setTitle(Messages.createWizardTitle);
@@ -158,7 +114,6 @@
data.left = new FormAttachment(0,5);
data.right = new FormAttachment(100,-5);
explanationLabel.setLayoutData(data);
-
explanationLabel.setText(Messages.serverWizardFragmentExplanation);
}
@@ -180,13 +135,13 @@
nameLabel.setText(Messages.wizardFragmentNameLabel);
nameText = new Text(nameComposite, SWT.BORDER);
- nameText.setText(getDefaultNameText());
+ name = getDefaultNameText();
+ nameText.setText(name);
nameText.addModifyListener(new ModifyListener() {
-
public void modifyText(ModifyEvent e) {
- updatePage(NAME_CHANGED);
+ name = nameText.getText();
+ updateErrorMessage();
}
-
});
// organize widgets inside composite
@@ -205,224 +160,67 @@
String base = "JBoss " + getVersion() + " server";
if( findServer(base) == null ) return base;
int i = 1;
- while( ServerCore.findServer(base + " " + i) != null )
+ while( ServerCore.findServer(base + " (" + i + ")") != null )
i++;
- return base + " " + i;
+ return base + " (" + i + ")";
}
private IServer findServer(String name) {
IServer[] servers = ServerCore.getServers();
for( int i = 0; i < servers.length; i++ ) {
Server server = (Server) servers[i];
- if (name.equals(server.getName()))
+ if (name.trim().equals(server.getName()))
return server;
}
return null;
}
- private void createHomeComposite(Composite main) {
- // Create our composite
- homeDirComposite = new Composite(main, SWT.NONE);
-
- FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
- cData.top = new FormAttachment(0, 5);
- homeDirComposite.setLayoutData(cData);
- homeDirComposite.setLayout(new FormLayout());
+ private void createRuntimeGroup(Composite main) {
+ g = new Group(main, SWT.BORDER);
+ g.setText(Messages.runtimeInformation);
+ FormData groupData = new FormData();
+ groupData.left = new FormAttachment(0,5);
+ groupData.right = new FormAttachment(100, -5);
+ groupData.top = new FormAttachment(nameComposite, 5);
+ g.setLayoutData(groupData);
+
+ g.setLayout(new GridLayout(2, false));
+ GridData d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
-
- // Create Internal Widgets
- homeDirLabel = new Label(homeDirComposite, SWT.NONE);
+ // Create our composite
+ homeDirLabel = new Label(g, SWT.NONE);
homeDirLabel.setText(Messages.wizardFragmentHomeDirLabel);
+ homeValLabel = new Label(g, SWT.NONE);
+ homeValLabel.setLayoutData(d);
- homeDirText = new Text(homeDirComposite, SWT.BORDER);
- homeDirText.setEnabled(false);
-
- // Set Layout Data
- FormData labelData = new FormData();
- FormData textData = new FormData();
- //FormData buttonData = new FormData();
-
- labelData.left = new FormAttachment(0,0);
- homeDirLabel.setLayoutData(labelData);
-
-
- textData.left = new FormAttachment(0, 5);
- textData.right = new FormAttachment(100, -5);
- textData.top = new FormAttachment(homeDirLabel, 5);
- homeDirText.setLayoutData(textData);
- }
-
- private void createJREComposite(Composite main) {
- // Create our composite
- jreComposite = new Composite(main, SWT.NONE);
-
- FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
- cData.top = new FormAttachment(homeDirComposite, 10);
- jreComposite.setLayoutData(cData);
-
- jreComposite.setLayout(new FormLayout());
-
-
- // Create Internal Widgets
- installedJRELabel = new Label(jreComposite, SWT.NONE);
+ installedJRELabel = new Label(g, SWT.NONE);
installedJRELabel.setText(Messages.wizardFragmentJRELabel);
+ jreValLabel = new Label(g, SWT.NONE);
+ d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
+ jreValLabel.setLayoutData(d);
- jreCombo = new Combo(jreComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
- jreCombo.setItems(jreNames);
- jreCombo.select(defaultVMIndex);
- jreCombo.setEnabled(false);
-
-
- // Set Layout Data
- FormData labelData = new FormData();
- FormData comboData = new FormData();
-
- labelData.left = new FormAttachment(0,5);
- labelData.top = new FormAttachment(0, 7);
- installedJRELabel.setLayoutData(labelData);
-
-
- comboData.left = new FormAttachment(installedJRELabel, 5);
- comboData.right = new FormAttachment(60, -5);
- comboData.top = new FormAttachment(homeDirComposite, 5);
- jreCombo.setLayoutData(comboData);
- }
-
- private void createConfigurationComposite(Composite main) {
- configComposite = new Composite(main, SWT.NONE);
-
- FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
- cData.top = new FormAttachment(jreComposite, 5);
- cData.bottom = new FormAttachment(100, -5);
- configComposite.setLayoutData(cData);
-
- configComposite.setLayout(new FormLayout());
-
-
- // Create Internal Widgets
- configLabel = new Label(configComposite, SWT.NONE);
+ configLabel = new Label(g, SWT.NONE);
configLabel.setText("Configuration");
-
- configText = new Text(configComposite, SWT.BORDER);
- configText.setEnabled(false);
-
- // Set Layout Data
- FormData labelData = new FormData();
- FormData textData = new FormData();
- //FormData buttonData = new FormData();
-
- labelData.left = new FormAttachment(0,0);
- configLabel.setLayoutData(labelData);
-
-
- textData.left = new FormAttachment(0, 5);
- textData.right = new FormAttachment(100, -5);
- textData.top = new FormAttachment(configLabel, 5);
- configText.setLayoutData(textData);
+ configValLabel = new Label(g, SWT.NONE);
+ d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
+ configValLabel.setLayoutData(d);
}
-
- private void updatePage(int changed) {
- switch( changed ) {
- case NAME_CHANGED:
- updateErrorMessage(SEVERITY_MAJOR);
- break;
- case HOME_CHANGED:
- updateErrorMessage(SEVERITY_MAJOR);
-
- break;
- case JRE_CHANGED:
- int sel = jreCombo.getSelectionIndex();
- if( sel != -1 )
- selectedVM = (IVMInstall) installedJREs.get(sel);
- break;
- case CONFIG_CHANGED:
- break;
- default:
- break;
- }
- }
-
- private void updateErrorMessage(int severity) {
- String error = getErrorString(severity);
+
+ private void updateErrorMessage() {
+ String error = getErrorString();
if( error == null ) {
handle.setMessage(null, IMessageProvider.NONE);
- return;
+ } else {
+ handle.setMessage(error, IMessageProvider.ERROR);
}
-
- handle.setMessage(error, IMessageProvider.ERROR);
-
}
- private String getErrorString(int severity) {
- if( getJbossServerFolder(nameText.getText()) != null && getJbossServerFolder(nameText.getText()).exists() ) {
+ private String getErrorString() {
+ if( findServer(name) != null )
return Messages.serverNameInUse;
- }
-
- if ( !new File(homeDirText.getText()).exists()) {
- return Messages.invalidDirectory;
- }
-
- if( severity == SEVERITY_MAJOR ) return null;
-
- // now give minor warnings
- if( nameText.getText().trim().equals(""))
- return Messages.nameTextBlank;
- if( homeDirText.getText().trim().equals(""))
- return Messages.homeDirBlank;
-
-
return null;
-
}
-
- protected File getDirectory(File startingDirectory, Shell shell) {
- DirectoryDialog fileDialog = new DirectoryDialog(shell, SWT.OPEN);
- if (startingDirectory != null) {
- fileDialog.setFilterPath(startingDirectory.getPath());
- }
- String dir = fileDialog.open();
- if (dir != null) {
- dir = dir.trim();
- if (dir.length() > 0) {
- return new File(dir);
- }
- }
- return null;
- }
-
- // JRE methods
- protected void updateJREs() {
- // get all installed JVMs
- installedJREs = new ArrayList();
- IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
- int size = vmInstallTypes.length;
- for (int i = 0; i < size; i++) {
- IVMInstall[] vmInstalls = vmInstallTypes[i].getVMInstalls();
- int size2 = vmInstalls.length;
- for (int j = 0; j < size2; j++) {
- installedJREs.add(vmInstalls[j]);
- }
- }
-
- // get names
- size = installedJREs.size();
- jreNames = new String[size];
- for (int i = 0; i < size; i++) {
- IVMInstall vmInstall = (IVMInstall) installedJREs.get(i);
- jreNames[i] = vmInstall.getName();
- }
-
- selectedVM = JavaRuntime.getDefaultVMInstall();
- defaultVMIndex = installedJREs.indexOf(selectedVM);
- }
-
// WST API methods
public void enter() {
IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
@@ -434,72 +232,35 @@
if( wc instanceof RuntimeWorkingCopy ) {
RuntimeWorkingCopy rwc = (RuntimeWorkingCopy)wc;
- homeDirText.setText(rwc.getLocation().toOSString());
- configText.setText(rwc.getAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, ""));
-
-
- String[] vmNames = jreCombo.getItems();
- IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(rwc.getAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, ""));
- String vmId = rwc.getAttribute(IJBossServerRuntime.PROPERTY_VM_ID, "");
-
- IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
-
- int comboIndex = -1;
- for (int i = 0; i < vmNames.length && comboIndex == -1; i++) {
- for( int j = 0; j < vmInstalls.length && comboIndex == -1; j++ ) {
-// ASDebug.p("comparing " + vmNames[i] + " with " + vmInstalls[j].getName(), this);
- if (vmNames[i].equals(vmInstalls[j].getName()) && vmInstalls[j].getId().equals(vmId))
- comboIndex = i;
- }
- }
-
- jreCombo.select(comboIndex);
-
+ homeValLabel.setText(rwc.getLocation().toOSString());
+ configValLabel.setText(rwc.getAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, ""));
+ AbstractJBossServerRuntime jbsrt = (AbstractJBossServerRuntime)wc.loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
+ IVMInstall install = jbsrt.getVM();
+ jreValLabel.setText(install.getInstallLocation().getAbsolutePath() + " (" + install.getName() + ")");
+ runtimeLoc = homeValLabel.getText();
+ configName = configValLabel.getText();
+ g.layout();
}
}
public void exit() {
- name = nameText.getText();
}
public void performFinish(IProgressMonitor monitor) throws CoreException {
IServerWorkingCopy serverWC = (IServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
- IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
- runtime = (IJBossServerRuntime) r.loadAdapter(IJBossServerRuntime.class, null);
-
-
-
- IFolder folder = getJbossServerFolder(name);
- if( !folder.exists()) {
- folder.create(true,true, new NullProgressMonitor());
- }
- serverWC.setServerConfiguration(folder);
+ serverWC.setRuntime((IRuntime)getTaskModel().getObject(TaskModel.TASK_RUNTIME));
serverWC.setName(name);
- serverWC.setRuntime(r);
-
- server = (JBossServer) serverWC.getAdapter(JBossServer.class);
- if( server == null ) {
- server = (JBossServer) serverWC.loadAdapter(JBossServer.class, new NullProgressMonitor());
- }
+ serverWC.setServerConfiguration(null);
+ //IServer s = serverWC.save(false, new NullProgressMonitor());
+ IPath configFolder = new Path(runtimeLoc).append("server").append(configName);
+ XPathModel.getDefault().loadDefaults((IServer)serverWC, configFolder.toOSString());
}
public boolean isComplete() {
- String s = getErrorString(SEVERITY_ALL);
- return s == null ? true : false;
+ return getErrorString() == null ? true : false;
}
public boolean hasComposite() {
return true;
}
-
-
-
- private IFolder getJbossServerFolder(String serverName) {
- try {
- return ServerType.getServerProject().getFolder(serverName);
- } catch( Exception e) {
- return null;
- }
- }
-
}
18 years, 4 months
JBoss Tools SVN: r3148 - in trunk/jst/plugins/org.jboss.tools.jst.web.tiles: dtds and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 12:04:48 -0400 (Wed, 15 Aug 2007)
New Revision: 3148
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/dtds/
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/dtds/tiles_config_1_1.dtd
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/plugin.xml
Log:
JBIDE-785
Added: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/dtds/tiles_config_1_1.dtd
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/dtds/tiles_config_1_1.dtd (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/dtds/tiles_config_1_1.dtd 2007-08-15 16:04:48 UTC (rev 3148)
@@ -0,0 +1,280 @@
+<!--
+ DTD for the Tile Definition File, Version 1.1
+
+ To support validation of your configuration file, include the following
+ DOCTYPE element at the beginning (after the "xml" declaration):
+
+ <!DOCTYPE tiles-definitions PUBLIC
+ "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+ $Id: tiles_config_1_1.dtd,v 1.1 2004/11/11 12:33:07 glory Exp $
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+ variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a tile
+ component.
+-->
+<!ENTITY % ContentType "(string|page|template|definition)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+ instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an application-relative URI path, beginning with a
+ slash, that identifies a mapped resource (such as a JSP page or a servlet)
+ within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+ is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+ and also serves as the name of the corresponding scripting variable
+ and the name of the JSP attribute under which the bean is accessed.
+ Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+ a lower case letter and contain only characters that are legal in a
+ Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+ defines the location of a resource relative to the location of the
+ configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+ <!-- deprecated: use tiles-definitions instead.-->
+<!ELEMENT component-definitions (definition*)>
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+ hierarchy, and contains nested elements for all of the other
+ configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition*)>
+
+<!-- The "definition" element describes definition that can be inserted in a jsp
+ page. This definition is identified by its logical name. A definition allows
+ to define all the attributes that can be set in <insert> tag from a jsp page.
+
+ name The unique identifier for this definition.
+
+ path The context-relative path to the resource used as tiles to
+ insert. This tiles will be inserted and a tiles context
+ containing appropriate attributes will be available.
+
+ page Same as path.
+ template Same as path. For compatibility with the template taglib.
+
+ extends Name of a definition that is used as ancestor of this definition.
+ All attributes from the ancestor are available to the new
+ definition. Any attribute inherited from the ancestor can
+ be overloaded by providing a new value.
+
+ role security role name that is allowed access to this definition
+ object. The definition is inserted only if the role name is
+ allowed.
+
+ controllerClass The fully qualified Java class name of the controller
+ subclass to call immediately before the tiles is inserted.
+ Only one of controllerClass or controllerUrl should be
+ specified.
+
+ controllerUrl The context-relative path to the resource used as controller
+ called immediately before the tiles is inserted.
+ Only one of controllerClass or controllerUrl should be
+ specified.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
+<!ATTLIST definition id ID #IMPLIED>
+<!ATTLIST definition name %DefinitionName; #REQUIRED>
+<!ATTLIST definition page %RequestPath; #IMPLIED>
+<!ATTLIST definition path %RequestPath; #IMPLIED>
+<!ATTLIST definition extends %DefinitionName; #IMPLIED>
+<!ATTLIST definition role CDATA #IMPLIED>
+<!ATTLIST definition template %RequestPath; #IMPLIED>
+<!ATTLIST definition controllerClass %ClassName; #IMPLIED>
+<!ATTLIST definition controllerUrl %RequestPath; #IMPLIED>
+
+
+<!-- The "put" element describes an attribute of a definition. It allows to
+ specify the tiles attribute name and its value. The tiles value can be
+ specified as an xml attribute, or in the body of the <put> tag.
+
+ name The unique identifier for this tiles attribute.
+
+ value The value associated to this tiles attribute. The value should
+ be specified with this tag attribute, or in the body of the tag.
+
+ type The type of the value. Can be: string, page, template or definition.
+ By default, no type is associated to a value. If a type is
+ associated, it will be used as a hint to process the value
+ when the attribute will be used in the inserted tiles.
+
+ content Same as value. For compatibility with the template taglib.
+
+ direct Same as type="string". For compatibility with the template
+ taglib.
+-->
+<!ELEMENT put (#PCDATA)>
+<!ATTLIST put id ID #IMPLIED>
+<!ATTLIST put name CDATA #REQUIRED>
+<!ATTLIST put value CDATA #IMPLIED>
+<!ATTLIST put type %ContentType; #IMPLIED>
+<!ATTLIST put content CDATA #IMPLIED>
+<!ATTLIST put direct %Boolean; #IMPLIED>
+
+
+<!-- The "putList" element describes a list attribute of a definition. It allows to
+ specify an attribute that is a java List containing any kind of values. In
+ the config file, the list elements are specified by nested <add>, <item> or
+ <putList>.
+
+ name The unique identifier for this tiles attribute.
+-->
+<!ELEMENT putList ( (add* | item* | bean* | putList*)*) >
+<!ATTLIST putList id ID #IMPLIED>
+<!ATTLIST putList name CDATA #REQUIRED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+<!-- The "add" element describes an element of a list. It is similar to the
+ <put> element.
+
+ value The value associated to this tiles attribute. The value should
+ be specified with this tag attribute, or in the body of the tag.
+
+ type The type of the value. Can be: string, page, template or definition.
+ By default, no type is associated to a value. If a type is
+ associated, it will be used as a hint to process the value
+ when the attribute will be used in the inserted tiles.
+
+ content Same as value. For compatibility with the template taglib.
+
+ direct Same as type="string". For compatibility with the template
+ taglib.
+-->
+<!ELEMENT add (#PCDATA)>
+<!ATTLIST add id ID #IMPLIED>
+<!ATTLIST add value CDATA #IMPLIED>
+<!ATTLIST add type %ContentType; #IMPLIED>
+<!ATTLIST add content CDATA #IMPLIED>
+<!ATTLIST add direct %Boolean; #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+ specified java classtype. This bean is initialized with appropriate nested
+ <set-property>.
+
+ classtype The fully qualified classname for this bean.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean id ID #IMPLIED>
+<!ATTLIST bean classtype %ClassName; #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+ a bean property. When the object representing
+ the surrounding element is instantiated, the accessor for the indicated
+ property is called and passed the indicated value.
+
+ property Name of the JavaBeans property whose setter method
+ will be called.
+
+ value String representation of the value to which this
+ property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property EMPTY>
+<!ATTLIST set-property id ID #IMPLIED>
+<!ATTLIST set-property property %PropName; #REQUIRED>
+<!ATTLIST set-property value CDATA #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+ element to the list. Each bean can contains different properties: value, link,
+ icon, tooltip. This properties are to be interpreted by the jsp page using
+ them.
+ By default the bean is of type
+ "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+ create list of beans used as menu items.
+
+ value The bean 'value' property.
+
+ link The bean 'link' property.
+
+ icon The bean 'icon' property.
+
+ tooltip The bean 'tooltip' property.
+
+ classtype The fully qualified classname for this bean.
+ If specified, the classname must be a subclass of the interface
+ "org.apache.struts.tiles.beans.MenuItem".
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item id ID #IMPLIED>
+<!ATTLIST item value CDATA #REQUIRED>
+<!ATTLIST item link CDATA #REQUIRED>
+<!ATTLIST item classtype %ClassName; #IMPLIED>
+<!ATTLIST item icon CDATA #IMPLIED>
+<!ATTLIST item tooltip CDATA #IMPLIED>
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+ about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description (#PCDATA)>
+<!ATTLIST description id ID #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+ the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name id ID #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+ specify the location, relative to the Struts configuration file, for small
+ and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon (small-icon?, large-icon?)>
+<!ATTLIST icon id ID #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+ configuration file, of a resource containing a large (32x32 pixel)
+ icon image.
+-->
+<!ELEMENT large-icon (%Location;)>
+<!ATTLIST large-icon id ID #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+ configuration file, of a resource containing a small (16x16 pixel)
+ icon image.
+-->
+<!ELEMENT small-icon (%Location;)>
+<!ATTLIST small-icon id ID #IMPLIED>
+
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/plugin.xml 2007-08-15 16:04:11 UTC (rev 3147)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/plugin.xml 2007-08-15 16:04:48 UTC (rev 3148)
@@ -81,4 +81,14 @@
<xclass id="org.jboss.tools.jst.web.tiles.model.handlers.CreateTilesSupport"
class="org.jboss.tools.jst.web.tiles.model.handlers.CreateTilesSupport"/>
</extension>
+
+
+ <extension point="org.eclipse.wst.xml.core.catalogContributions">
+ <catalogContribution id="default">
+ <public
+ publicId="-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+ uri="dtds/tiles_config_1_1.dtd"/>
+ </catalogContribution>
+ </extension>
+
</plugin>
\ No newline at end of file
18 years, 4 months
JBoss Tools SVN: r3147 - in trunk/struts/plugins/org.jboss.tools.struts: dtds and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 12:04:11 -0400 (Wed, 15 Aug 2007)
New Revision: 3147
Removed:
trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles_config_1_1.dtd
Modified:
trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
Log:
JBIDE-785
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles_config_1_1.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles_config_1_1.dtd 2007-08-15 15:44:48 UTC (rev 3146)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles_config_1_1.dtd 2007-08-15 16:04:11 UTC (rev 3147)
@@ -1,280 +0,0 @@
-<!--
- DTD for the Tile Definition File, Version 1.1
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
-
- $Id: tiles_config_1_1.dtd,v 1.1 2004/11/11 12:33:07 glory Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false)">
-
-
-<!-- A "ContentType" is the content type of an attribute passed to a tile
- component.
--->
-<!ENTITY % ContentType "(string|page|template|definition)">
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-<!-- A "RequestPath" is an application-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
- is a logical name used to reference the definition.
--->
-<!ENTITY % DefinitionName "CDATA">
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
- <!-- deprecated: use tiles-definitions instead.-->
-<!ELEMENT component-definitions (definition*)>
-
-<!-- The "tiles-definitions" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT tiles-definitions (definition*)>
-
-<!-- The "definition" element describes definition that can be inserted in a jsp
- page. This definition is identified by its logical name. A definition allows
- to define all the attributes that can be set in <insert> tag from a jsp page.
-
- name The unique identifier for this definition.
-
- path The context-relative path to the resource used as tiles to
- insert. This tiles will be inserted and a tiles context
- containing appropriate attributes will be available.
-
- page Same as path.
- template Same as path. For compatibility with the template taglib.
-
- extends Name of a definition that is used as ancestor of this definition.
- All attributes from the ancestor are available to the new
- definition. Any attribute inherited from the ancestor can
- be overloaded by providing a new value.
-
- role security role name that is allowed access to this definition
- object. The definition is inserted only if the role name is
- allowed.
-
- controllerClass The fully qualified Java class name of the controller
- subclass to call immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
-
- controllerUrl The context-relative path to the resource used as controller
- called immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
--->
-<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
-<!ATTLIST definition id ID #IMPLIED>
-<!ATTLIST definition name %DefinitionName; #REQUIRED>
-<!ATTLIST definition page %RequestPath; #IMPLIED>
-<!ATTLIST definition path %RequestPath; #IMPLIED>
-<!ATTLIST definition extends %DefinitionName; #IMPLIED>
-<!ATTLIST definition role CDATA #IMPLIED>
-<!ATTLIST definition template %RequestPath; #IMPLIED>
-<!ATTLIST definition controllerClass %ClassName; #IMPLIED>
-<!ATTLIST definition controllerUrl %RequestPath; #IMPLIED>
-
-
-<!-- The "put" element describes an attribute of a definition. It allows to
- specify the tiles attribute name and its value. The tiles value can be
- specified as an xml attribute, or in the body of the <put> tag.
-
- name The unique identifier for this tiles attribute.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- content Same as value. For compatibility with the template taglib.
-
- direct Same as type="string". For compatibility with the template
- taglib.
--->
-<!ELEMENT put (#PCDATA)>
-<!ATTLIST put id ID #IMPLIED>
-<!ATTLIST put name CDATA #REQUIRED>
-<!ATTLIST put value CDATA #IMPLIED>
-<!ATTLIST put type %ContentType; #IMPLIED>
-<!ATTLIST put content CDATA #IMPLIED>
-<!ATTLIST put direct %Boolean; #IMPLIED>
-
-
-<!-- The "putList" element describes a list attribute of a definition. It allows to
- specify an attribute that is a java List containing any kind of values. In
- the config file, the list elements are specified by nested <add>, <item> or
- <putList>.
-
- name The unique identifier for this tiles attribute.
--->
-<!ELEMENT putList ( (add* | item* | bean* | putList*)*) >
-<!ATTLIST putList id ID #IMPLIED>
-<!ATTLIST putList name CDATA #REQUIRED>
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-<!-- The "add" element describes an element of a list. It is similar to the
- <put> element.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- content Same as value. For compatibility with the template taglib.
-
- direct Same as type="string". For compatibility with the template
- taglib.
--->
-<!ELEMENT add (#PCDATA)>
-<!ATTLIST add id ID #IMPLIED>
-<!ATTLIST add value CDATA #IMPLIED>
-<!ATTLIST add type %ContentType; #IMPLIED>
-<!ATTLIST add content CDATA #IMPLIED>
-<!ATTLIST add direct %Boolean; #IMPLIED>
-
-
-<!-- The "bean" element describes an element of a list. It create a bean of the
- specified java classtype. This bean is initialized with appropriate nested
- <set-property>.
-
- classtype The fully qualified classname for this bean.
--->
-<!ELEMENT bean (set-property*)>
-<!ATTLIST bean id ID #IMPLIED>
-<!ATTLIST bean classtype %ClassName; #REQUIRED>
-
-<!-- The "set-property" element specifies the method name and initial value of
- a bean property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "item" element describes an element of a list. It create a bean added as
- element to the list. Each bean can contains different properties: value, link,
- icon, tooltip. This properties are to be interpreted by the jsp page using
- them.
- By default the bean is of type
- "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
- create list of beans used as menu items.
-
- value The bean 'value' property.
-
- link The bean 'link' property.
-
- icon The bean 'icon' property.
-
- tooltip The bean 'tooltip' property.
-
- classtype The fully qualified classname for this bean.
- If specified, the classname must be a subclass of the interface
- "org.apache.struts.tiles.beans.MenuItem".
--->
-<!ELEMENT item (#PCDATA)>
-<!ATTLIST item id ID #IMPLIED>
-<!ATTLIST item value CDATA #REQUIRED>
-<!ATTLIST item link CDATA #REQUIRED>
-<!ATTLIST item classtype %ClassName; #IMPLIED>
-<!ATTLIST item icon CDATA #IMPLIED>
-<!ATTLIST item tooltip CDATA #IMPLIED>
-
-<!-- ========== Info Elements ====================================== -->
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Modified: trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2007-08-15 15:44:48 UTC (rev 3146)
+++ trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2007-08-15 16:04:11 UTC (rev 3147)
@@ -49,9 +49,6 @@
publicId="-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
uri="dtds/struts-config_1_2.dtd"/>
<public
- publicId="-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- uri="dtds/tiles-config_1_1.dtd"/>
- <public
publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
uri="dtds/validator_1_0.dtd"/>
</catalogContribution>
18 years, 4 months
JBoss Tools SVN: r3146 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-15 11:44:48 -0400 (Wed, 15 Aug 2007)
New Revision: 3146
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
link which discased how fix linux start up problems was changed to
http://www.redhat.com/developers/rhds/Getting_Started/GettingStartedWithR...
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2007-08-15 15:24:13 UTC (rev 3145)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2007-08-15 15:44:48 UTC (rev 3146)
@@ -7,7 +7,7 @@
SHOW_BORDER_FOR_ALL_TAGS=show border for all tags
MOZILLA_LOADING_ERROR=The VPE editor can't be run because your system environment needs to be changed slightly.
MOZILLA_LOADING_ERROR_LINK_TEXT=Find out more.
-MOZILLA_LOADING_ERROR_LINK=http://www.exadel.com/exadelstudio/help/linuxJavaNotes.html
+MOZILLA_LOADING_ERROR_LINK=http://www.redhat.com/developers/rhds/Getting_Started/GettingStartedWithRHDS.html#Installation_Issues
SHOW_COMMENTS=show comments
SHOW_BORDER_FOR_UNKNOWN_TAGS=show border for unknown tags
USE_DETAIL_BORDER=use detail border
18 years, 4 months
JBoss Tools SVN: r3145 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-15 11:24:13 -0400 (Wed, 15 Aug 2007)
New Revision: 3145
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
EXIN-336 added temporary output to find cause of build failures
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-15 13:59:24 UTC (rev 3144)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-15 15:24:13 UTC (rev 3145)
@@ -78,8 +78,13 @@
}
try {
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
- XJob.waitForJob();
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ System.out.println("Interruption ignored");
+ }
} catch (Exception e) {
+ e.printStackTrace();
fail("Cannot build");
}
ISeamProject seamProject = null;
18 years, 4 months
JBoss Tools SVN: r3144 - trunk/documentation/GettingStartedGuide/docs/userguide/en/images.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-08-15 09:59:24 -0400 (Wed, 15 Aug 2007)
New Revision: 3144
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj06.png
Log:
image added
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/SeamNewProj06.png
===================================================================
(Binary files differ)
18 years, 4 months
JBoss Tools SVN: r3143 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: selbar and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-08-15 09:39:06 -0400 (Wed, 15 Aug 2007)
New Revision: 3143
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
code adjustment
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-15 13:02:34 UTC (rev 3142)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-08-15 13:39:06 UTC (rev 3143)
@@ -2409,7 +2409,9 @@
public void selectionChanged(SelectionChangedEvent event) {
if (editPart.getVisualMode() != VpeEditorPart.PREVIEW_MODE) {
if(toolbarFormatControllerManager != null) toolbarFormatControllerManager.selectionChanged();
- if(selectionBar != null) selectionBar.selectionChanged();
+
+ //change selection in selection bar
+ if(selectionBar != null) selectionBar.selectionChanged();
}
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-08-15 13:02:34 UTC (rev 3142)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-08-15 13:39:06 UTC (rev 3143)
@@ -198,12 +198,16 @@
item.addSelectionListener(this);
item.setData(node);
}
+
item.setText(node.getNodeName());
elementCounter++;
node = node.getParentNode();
}
+
itemCount = elementCounter;
cmpToolBar.layout();
+ //bug was fixed when toolbar are not shown for resizeble components
+ cmpToolBar.layout();
}
protected Point computeSize(Composite composite, int wHint, int hHint,
18 years, 4 months