JBoss Tools SVN: r2646 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-25 04:32:20 -0400 (Wed, 25 Jul 2007)
New Revision: 2646
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
Log:
JBIDE-605 Null pointer fixed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-07-25 07:41:49 UTC (rev 2645)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/XActionProvider.java 2007-07-25 08:32:20 UTC (rev 2646)
@@ -72,6 +72,11 @@
if(e instanceof IFile) {
IFile f = (IFile)e;
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
+ if(o == null) {
+ EclipseResourceUtil.createObjectForResource(f.getProject());
+ o = EclipseResourceUtil.createObjectForResource(f);
+ }
+ if(o == null) return;
add(o, menu, false);
} else if((e instanceof XModelObject)) {
XModelObject o = (XModelObject)e;
17 years, 5 months
JBoss Tools SVN: r2645 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-25 03:41:49 -0400 (Wed, 25 Jul 2007)
New Revision: 2645
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java
Log:
In case when handler is not set, looking for class is avoided.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java 2007-07-25 07:23:47 UTC (rev 2644)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java 2007-07-25 07:41:49 UTC (rev 2645)
@@ -223,7 +223,7 @@
}
public Object createInstance() {
- if(name == null) return null;
+ if(name == null || name.trim().length() == 0) return null;
validate();
try {
return ModelFeatureFactory.getInstance().createFeatureInstance(name);
17 years, 5 months
JBoss Tools SVN: r2644 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-25 03:23:47 -0400 (Wed, 25 Jul 2007)
New Revision: 2644
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ProjectContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamProjectLabelProvider.java
Log:
EXIN-218 Comments added.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2007-07-25 02:15:30 UTC (rev 2643)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2007-07-25 07:23:47 UTC (rev 2644)
@@ -40,6 +40,17 @@
import org.jboss.tools.seam.core.event.SeamProjectChangeEvent;
/**
+ * Basic type for content providers that add seam components
+ * tree structure to views based on
+ * org.eclipse.ui.navigator.CommonNavigator
+ * Sub-classes need to override methods getChildren(Object)
+ * and getParent(Object) to specify starting points of the
+ * seam components sub-trees.
+ * Content provider for stand-alone view may start from
+ * the workspace root, while content provider contributing
+ * to the standard Project Explorer is better to append
+ * project-specific seam components to that project's node.
+ *
* @author Viacheslav Kabanovich
*/
public abstract class AbstractSeamContentProvider implements ITreeContentProvider, ISeamProjectChangeListener {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ProjectContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ProjectContentProvider.java 2007-07-25 02:15:30 UTC (rev 2643)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ProjectContentProvider.java 2007-07-25 07:23:47 UTC (rev 2644)
@@ -16,10 +16,21 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
+ * This content provider is designed to add "Seam Components" node
+ * and sub-tree for each Eclipse project, which is a seam project as well,
+ * to the standard Project Explorer view.
+ *
* @author Viacheslav Kabanovich
*/
public class ProjectContentProvider extends AbstractSeamContentProvider {
+ /**
+ * Returns child nodes for the sub-tree of seam components
+ * to the standard Project Explorer view.
+ * Root node of the sub-tree is appended as child to each node of
+ * Eclipse project, which is a seam project as well.
+ */
+ @Override
public Object[] getChildren(Object parentElement) {
if(parentElement instanceof IJavaProject) {
parentElement = ((IJavaProject)parentElement).getProject();
@@ -37,6 +48,7 @@
}
}
+ @Override
public Object getParent(Object element) {
if(element instanceof ISeamProject) {
return ((ISeamProject)element).getProject();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2007-07-25 02:15:30 UTC (rev 2643)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/RootContentProvider.java 2007-07-25 07:23:47 UTC (rev 2644)
@@ -20,6 +20,9 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
+ * This content provider is designed for stand-alone Seam Components view
+ * to build all the tree starting from the workspace root.
+ *
* @author Viacheslav Kabanovich
*/
public class RootContentProvider extends AbstractSeamContentProvider {
@@ -27,7 +30,12 @@
public RootContentProvider() {}
-
+ /**
+ * Returns child nodes for the tree of stand alone Seam Components view.
+ * On the first level, array of ISeamProject objects for projects that are
+ * seam projects is returned.
+ */
+ @Override
public Object[] getChildren(Object parentElement) {
if(parentElement instanceof IWorkspaceRoot) {
IWorkspaceRoot root = (IWorkspaceRoot)parentElement;
@@ -50,6 +58,7 @@
}
}
+ @Override
public Object getParent(Object element) {
if(element instanceof ISeamProject) {
return root;
@@ -58,6 +67,7 @@
}
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
if(newInput instanceof IWorkspaceRoot || newInput == null) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamProjectLabelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamProjectLabelProvider.java 2007-07-25 02:15:30 UTC (rev 2643)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamProjectLabelProvider.java 2007-07-25 07:23:47 UTC (rev 2644)
@@ -13,12 +13,17 @@
import org.jboss.tools.seam.core.ISeamProject;
/**
+ * This implementation is designed for standard Projects Explorer
+ * view to provide 'Seam Components' name for the root node of
+ * the appended sub-tree.
+ *
* @author Viacheslav Kabanovich
*/
public class SeamProjectLabelProvider extends SeamLabelProvider {
public SeamProjectLabelProvider() {}
+ @Override
public String getText(Object element) {
if(element instanceof ISeamProject) {
return "Seam Components";
17 years, 5 months
JBoss Tools SVN: r2643 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/dialogs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-24 22:15:30 -0400 (Tue, 24 Jul 2007)
New Revision: 2643
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
Twiddle docs inline
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java 2007-07-25 02:14:55 UTC (rev 2642)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java 2007-07-25 02:15:30 UTC (rev 2643)
@@ -1,14 +1,11 @@
package org.jboss.ide.eclipse.as.ui.dialogs;
-import java.net.URL;
-
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FormAttachment;
@@ -21,26 +18,21 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
+import org.eclipse.ui.internal.Workbench;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
import org.jboss.ide.eclipse.as.core.server.JBossServerLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.TwiddleLauncher;
import org.jboss.ide.eclipse.as.core.server.TwiddleLauncher.ProcessData;
import org.jboss.ide.eclipse.as.ui.Messages;
-public class TwiddleDialog extends Dialog {
+public class TwiddleDialog extends TrayDialog {
private static final int EXECUTE_ID = 2042;
private Text query, results;
private Label queryLabel;
private IServer server = null;
private Composite parentComposite;
- private Hyperlink twiddleTutorialLink;
public TwiddleDialog(Shell parentShell, Object selection) {
@@ -128,41 +120,9 @@
queryLabelData.top = new FormAttachment(0,5);
queryLabel.setLayoutData(queryLabelData);
-
- twiddleTutorialLink = new Hyperlink(main, SWT.NONE);
- twiddleTutorialLink.setText(Messages.TwiddleDialogTutorial);
- twiddleTutorialLink.setForeground(new Color(null, 0, 0, 255));
- twiddleTutorialLink.setUnderlined(true);
- FormData twiddleTutorialData = new FormData();
- twiddleTutorialData.right = new FormAttachment(100, -5);
- twiddleTutorialData.top = new FormAttachment(0,5);
- twiddleTutorialLink.setLayoutData(twiddleTutorialData);
+ Workbench.getInstance().getHelpSystem().setHelp(getShell(),
+ "org.jboss.ide.eclipse.as.ui.twiddle_usage_tutorial_help");
-
- twiddleTutorialLink.addHyperlinkListener(new IHyperlinkListener() {
-
- public void linkActivated(HyperlinkEvent e) {
- String url = "http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch2.chapter.html#d0e4253";
- IWorkbenchBrowserSupport browserSupport = ServerUIPlugin.getInstance().getWorkbench().getBrowserSupport();
- try {
- IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR, null, null, null);
- browser.openURL(new URL(url));
- close();
- } catch( Exception ee ) {
-
- }
- }
-
- public void linkEntered(HyperlinkEvent e) {
- }
-
- public void linkExited(HyperlinkEvent e) {
- }
-
- } );
-
-
-
query = new Text(main, SWT.BORDER);
FormData queryData = new FormData();
queryData.top = new FormAttachment(queryLabel, 5);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-07-25 02:14:55 UTC (rev 2642)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-07-25 02:15:30 UTC (rev 2643)
@@ -302,5 +302,11 @@
id="org.jboss.ide.eclipse.packages.ui.newEARAction"
label="EAR"/>
</extension>
+ <extension
+ point="org.eclipse.help.contexts">
+ <contexts
+ file="InlineDocs/Twiddle/twiddleContext.xml">
+ </contexts>
+ </extension>
</plugin>
17 years, 5 months
JBoss Tools SVN: r2642 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: InlineDocs and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-24 22:14:55 -0400 (Tue, 24 Jul 2007)
New Revision: 2642
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle.html
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddleContext.xml
Log:
Twiddle docs inline
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle.html
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle.html (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/Twiddle.html 2007-07-25 02:14:55 UTC (rev 2642)
@@ -0,0 +1,217 @@
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Using Twiddle</title>
+ <link rel="stylesheet" href="html.css" type="text/css">
+ An excerpt from <a href="http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch2.chapter.html#d0e4253">JBoss JMX Documentation</a> online.<br/>
+ <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4253"></a>Command Line Access to JMX</h3></div></div><div></div></div><p>JBoss provides a simple command line tool that allows for
+ interaction with a remote JMX server instance. This tool is
+ called twiddle (for twiddling bits via JMX) and is located in
+ the <tt class="literal">bin</tt> directory of the distribution.
+ Twiddle is a command execution tool, not a general command
+ shell. It is run using either the <tt class="literal">twiddle.sh</tt>
+
+ or <tt class="literal">twiddle.bat</tt> scripts, and passing in a
+ <tt class="literal">-h</tt>(<tt class="literal">--help</tt>) argument
+ provides the basic syntax, and
+ <tt class="literal">--help-commands</tt> shows what you can do with
+ the tool:</p><pre class="programlisting">[bin]$ ./twiddle.sh -h
+A JMX client to 'twiddle' with a remote JBoss server.
+
+usage: twiddle.sh [options] <command> [command_arguments]
+
+options:
+ -h, --help Show this help message
+ --help-commands Show a list of commands
+ -H=<command> Show command specific help
+ -c=command.properties Specify the command.properties file to use
+ -D<name>[=<value>] Set a system property
+ -- Stop processing options
+ -s, --server=<url> The JNDI URL of the remote server
+ -a, --adapter=<name> The JNDI name of the RMI adapter to use
+ -q, --quiet Be somewhat more quiet
+
+</pre><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4278"></a>2.3.3.1. Connecting twiddle to a Remote Server</h4></div></div><div></div></div><p>By default the twiddle command will connect to the
+ localhost at port 1099 to lookup the default
+ <tt class="literal">jmx/rmi/RMIAdaptor</tt> binding of the
+ <tt class="literal">RMIAdaptor</tt> service as the connector for
+ communicating with the JMX server. To connect to a different
+ server/port combination you can use the
+ <tt class="literal">-s</tt> (<tt class="literal">--server</tt>) option:</p><pre class="programlisting">[bin]$ ./twiddle.sh -s toki serverinfo -d jboss
+[bin]$ ./twiddle.sh -s toki:1099 serverinfo -d jboss
+</pre><p>To connect using a different RMIAdaptor binding use the
+ <tt class="literal">-a</tt> (--<tt class="literal">adapter</tt>) option:</p><pre class="programlisting">[bin]$ ./twiddle.sh -s toki -a jmx/rmi/RMIAdaptor serverinfo -d jboss</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4307"></a>2.3.3.2. Sample twiddle Command Usage</h4></div></div><div></div></div><p>To access basic information about a server, use the
+ <tt class="literal">serverinfo</tt> command. This currently supports:</p><pre class="programlisting">[bin]$ ./twiddle.sh -H serverinfo
+Get information about the MBean server
+
+usage: serverinfo [options]
+
+options:
+ -d, --domain Get the default domain
+ -c, --count Get the MBean count
+ -l, --list List the MBeans
+ -- Stop processing options
+[bin]$ ./twiddle.sh --server=toki serverinfo --count
+460
+[bin]$ ./twiddle.sh --server=toki serverinfo --domain
+jboss
+
+</pre><p>To query the server for the name of MBeans matching a
+ pattern, use the <tt class="literal">query</tt> command. This
+ currently supports:</p><pre class="programlisting">[bin]$ ./twiddle.sh -H query
+Query the server for a list of matching MBeans
+
+usage: query [options] <query>
+options:
+ -c, --count Display the matching MBean count
+ -- Stop processing options
+Examples:
+ query all mbeans: query '*:*'
+ query all mbeans in the jboss.j2ee domain: query 'jboss.j2ee:*'
+[bin]$ ./twiddle.sh -s toki query 'jboss:service=invoker,*'
+jboss:readonly=true,service=invoker,target=Naming,type=http
+jboss:service=invoker,type=jrmp
+jboss:service=invoker,type=local
+jboss:service=invoker,type=pooled
+jboss:service=invoker,type=http
+jboss:service=invoker,target=Naming,type=http</pre><p>To get the attributes of an MBean, use the get command:</p><pre class="programlisting">[bin]$ ./twiddle.sh -H get
+Get the values of one or more MBean attributes
+
+usage: get [options] <name> [<attr>+]
+ If no attribute names are given all readable attributes are retrieved
+options:
+ --noprefix Do not display attribute name prefixes
+ -- Stop processing options
+[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp RMIObjectPort StateString
+RMIObjectPort=4444
+StateString=Started
+[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp
+ServerAddress=0.0.0.0
+RMIClientSocketFactoryBean=null
+StateString=Started
+State=3
+RMIServerSocketFactoryBean=org.jboss.net.sockets.DefaultSocketFactory@ad093076
+EnableClassCaching=false
+SecurityDomain=null
+RMIServerSocketFactory=null
+Backlog=200
+RMIObjectPort=4444
+Name=JRMPInvoker
+RMIClientSocketFactory=null</pre><p>To query the MBeanInfo for an MBean, use the info command:</p><pre class="programlisting">[bin]$ ./twiddle.sh -H info
+Get the metadata for an MBean
+
+
+usage: info <mbean-name>
+ Use '*' to query for all attributes
+[bin]$ Description: Management Bean.
++++ Attributes:
+ Name: ServerAddress
+ Type: java.lang.String
+ Access: rw
+ Name: RMIClientSocketFactoryBean
+ Type: java.rmi.server.RMIClientSocketFactory
+ Access: rw
+ Name: StateString
+ Type: java.lang.String
+ Access: r-
+ Name: State
+ Type: int
+ Access: r-
+ Name: RMIServerSocketFactoryBean
+ Type: java.rmi.server.RMIServerSocketFactory
+ Access: rw
+ Name: EnableClassCaching
+ Type: boolean
+ Access: rw
+ Name: SecurityDomain
+ Type: java.lang.String
+ Access: rw
+ Name: RMIServerSocketFactory
+ Type: java.lang.String
+ Access: rw
+ Name: Backlog
+ Type: int
+ Access: rw
+ Name: RMIObjectPort
+ Type: int
+ Access: rw
+ Name: Name
+ Type: java.lang.String
+ Access: r-
+ Name: RMIClientSocketFactory
+ Type: java.lang.String
+ Access: rw
++++ Operations:
+ void start()
+ void jbossInternalLifecycle(java.lang.String java.lang.String)
+ void create()
+ void stop()
+ void destroy()</pre><p>To invoke an operation on an MBean, use the invoker command:</p><pre class="programlisting">[bin]$ ./twiddle.sh -H invoke
+Invoke an operation on an MBean
+
+usage: invoke [options] <query> <operation> (<arg>)*
+
+options:
+ -q, --query-type[=<type>] Treat object name as a query
+ -- Stop processing options
+
+query type:
+ f[irst] Only invoke on the first matching name [default]
+ a[ll] Invoke on all matching names
+[bin]$ ./twiddle.sh invoke jboss:service=JNDIView list true
+
+<h1>java: Namespace</h1>
+<pre>
+ +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+ +- DefaultDS (class: javax.sql.DataSource)
+ +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+ +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+ +- comp (class: javax.naming.Context)
+ +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+ +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+ +- jaas (class: javax.naming.Context)
+ | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+ | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
+ | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
+ +- timedCacheFactory (class: javax.naming.Context)
+Failed to lookup: timedCacheFactory, errmsg=null
+ +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+ +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+ +- Mail (class: javax.mail.Session)
+ +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+ +- TransactionManager (class: org.jboss.tm.TxManager)
+</pre>
+<h1>Global JNDI Namespace</h1>
+<pre>
+ +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+ +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+ +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+ +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+ +- console (class: org.jnp.interfaces.NamingContext)
+ | +- PluginManager (proxy: $Proxy36 implements interface org.jboss.console.manager.PluginManagerMBean)
+ +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+ +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
+ +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+ +- topic (class: org.jnp.interfaces.NamingContext)
+ | +- testDurableTopic (class: org.jboss.mq.SpyTopic)
+ | +- testTopic (class: org.jboss.mq.SpyTopic)
+ | +- securedTopic (class: org.jboss.mq.SpyTopic)
+ +- queue (class: org.jnp.interfaces.NamingContext)
+ | +- A (class: org.jboss.mq.SpyQueue)
+ | +- testQueue (class: org.jboss.mq.SpyQueue)
+ | +- ex (class: org.jboss.mq.SpyQueue)
+ | +- DLQ (class: org.jboss.mq.SpyQueue)
+ | +- D (class: org.jboss.mq.SpyQueue)
+ | +- C (class: org.jboss.mq.SpyQueue)
+ | +- B (class: org.jboss.mq.SpyQueue)
+ +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+ +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+ +- jmx (class: org.jnp.interfaces.NamingContext)
+ | +- invoker (class: org.jnp.interfaces.NamingContext)
+ | | +- RMIAdaptor (proxy: $Proxy35 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
+ | +- rmi (class: org.jnp.interfaces.NamingContext)
+ | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+ +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+ +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+ +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+
+</pre></pre></div></div>
\ No newline at end of file
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddleContext.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddleContext.xml (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/InlineDocs/Twiddle/twiddleContext.xml 2007-07-25 02:14:55 UTC (rev 2642)
@@ -0,0 +1,6 @@
+ <contexts>
+ <context id="twiddle_usage_tutorial_help">
+ <description>Click below to access the Twiddle Tutorial</description>
+ <topic href="InlineDocs/Twiddle/Twiddle.html" label="Twiddle Tutorial"/>
+ </context>
+ </contexts>
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2641 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-24 18:40:17 -0400 (Tue, 24 Jul 2007)
New Revision: 2641
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
Log:
Fixed JBIDE-568
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java 2007-07-24 17:43:33 UTC (rev 2640)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java 2007-07-24 22:40:17 UTC (rev 2641)
@@ -112,12 +112,6 @@
jar.setExploded(false);
}
jar.setName(packageName);
-
- IArchiveFileSet classes = ArchiveNodeFactory.createFileset();
- classes.setIncludesPattern("**/*");
- classes.setSourcePath(sourceContainer.getFullPath());
- classes.setInWorkspace(true);
- jar.addChild(classes);
return jar;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-07-24 17:43:33 UTC (rev 2640)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-07-24 22:40:17 UTC (rev 2641)
@@ -167,9 +167,10 @@
// add lib folder so we can add libraries
IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
IArchiveFolder lib = addFolder(project, webinf, LIB);
-
+ IArchiveFolder classes = addFolder(project, webinf, CLASSES);
+
addFileset(project, topLevel, new Path(project.getName()).append(WEBCONTENT).toOSString(), null);
-
+ addClassesFileset(project, classes);
// package each child and add to lib folder
IWebModule webModule = (IWebModule)mod.loadAdapter(IWebModule.class, monitor);
17 years, 5 months
JBoss Tools SVN: r2640 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-24 13:43:33 -0400 (Tue, 24 Jul 2007)
New Revision: 2640
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/legacy/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Legacy removed. plugin.xml changed (cleanup + added new wtp facet support)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-07-24 17:33:33 UTC (rev 2639)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-07-24 17:43:33 UTC (rev 2640)
@@ -94,13 +94,7 @@
<moduleType
types="jst.ear"
versions="1.2, 1.3, 1.4"/>
-<!-- <moduleType
- types="jboss.archive"
- versions="1.0"/>
<moduleType
- types="jboss.xml"
- versions="1.0"/> -->
- <moduleType
types="jboss.package"
versions="1.0"/>
@@ -206,26 +200,7 @@
<extension
point="org.eclipse.wst.server.core.moduleFactories">
-<!--
<moduleFactory
- class="org.jboss.ide.eclipse.as.core.module.ArchiveModuleFactory"
- id="org.jboss.ide.eclipse.as.core.ArchiveFactory"
- order="2"
- projects="true">
- <moduleType
- versions="1.0"
- types="jboss.archive">
- </moduleType>
- </moduleFactory>
- <moduleFactory
- class="org.jboss.ide.eclipse.as.core.module.XMLModuleFactory"
- id="org.jboss.ide.eclipse.as.core.XmlFactory"
- projects="false">
- <moduleType
- types="jboss.xml"
- versions="1.0"/>
- </moduleFactory> -->
- <moduleFactory
class="org.jboss.ide.eclipse.as.core.packages.PackageModuleFactory"
id="org.jboss.ide.eclipse.as.core.PackageModuleFactory"
projects="true">
@@ -241,14 +216,6 @@
<!-- Adapters and clients to make stuff 'runnable' on server -->
<extension
point="org.eclipse.wst.server.core.moduleArtifactAdapters">
-<!-- <moduleArtifactAdapter
- class="org.jboss.ide.eclipse.as.core.module.JBossModuleArtifactAdapter"
- id="org.jboss.ide.eclipse.as.core.artifactAdapter"
- priority="20">
- <enablement>
- <instanceof value="org.eclipse.core.resources.IResource"/>
- </enablement>
- </moduleArtifactAdapter> -->
<moduleArtifactAdapter
class="org.jboss.ide.eclipse.as.core.packages.PackagedArtifactAdapter"
id="org.jboss.ide.eclipse.as.core.PackagedArtifactAdapter"
@@ -269,21 +236,6 @@
id="org.jboss.ide.eclipse.as.core.launchableAdapter1"/>
</extension>
- <!--
-
- <extension
- point="org.eclipse.wst.server.core.clients">
- <client
- class="org.jboss.ide.eclipse.as.core.client.DoNothingClient"
- description="No action is taken."
- id="org.jboss.ide.eclipse.as.core.client.DoNothingClient"
- name="Take No Action"
- priority="20"/>
- </extension>
--->
-
-
-
<!-- How to determine whether the server is up or down -->
<extension
point="org.jboss.ide.eclipse.as.core.pollers">
@@ -399,21 +351,23 @@
<supported>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.42"
- version="4.2"/>
+ id="org.jboss.ide.eclipse.as.runtime.component.42"
+ version="4.2"/>
<facet
- id="jst.web"
- version="2.2,2.3,2.4"/>
- <facet id="jst.java" version="1.3,1.4,5.0"/>
+ id="jst.web"
+ version="2.2,2.3,2.4,2.5"/>
+ <facet
+ id="jst.java"
+ version="1.3,1.4,5.0"/>
<facet
- id="jst.utility"
- version="1.0"/>
+ id="jst.utility"
+ version="1.0"/>
<facet
id="jst.ejb"
- version="2.0,2.1"/>
+ version="1.0,1.1,2.0,2.1,3.0"/>
<facet
id="jst.ear"
- version="1.2,1.3,1.4"/>
+ version="1.2,1.3,1.4,5.0"/>
<facet
id="jst.appclient"
version="1.2,1.3,1.4"/>
@@ -422,34 +376,14 @@
version="1.0"/>
</supported>
-
-
-<!--
<adapter>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component.32"
version="3.2"/>
- <runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.40"
- version="4.0"/>
- <runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.42"
- version="4.2"/>
<factory
class="org.jboss.ide.eclipse.as.core.runtime.internal.ProjectRuntimeClasspathProvider$Factory"/>
<type
class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
- </adapter>
-
- -->
- <adapter>
- <runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.32"
- version="3.2"/>
- <factory
- class="org.jboss.ide.eclipse.as.core.runtime.internal.ProjectRuntimeClasspathProvider$Factory"/>
- <type
- class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
</adapter>
<adapter>
@@ -489,13 +423,7 @@
</extension>
<extension
point="org.eclipse.wst.server.core.moduleTypes">
-<!-- <moduleType
- id="jboss.archive"
- name="Archive Module"/>
<moduleType
- id="jboss.xml"
- name="XML Module"/> -->
- <moduleType
id="jboss.package"
name="Project Package"/>
</extension>
17 years, 5 months
JBoss Tools SVN: r2639 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors: parts and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-24 13:33:33 -0400 (Tue, 24 Jul 2007)
New Revision: 2639
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialRootClass.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
Log:
EXIN-366: Adding elements on the diagram by double-click on fields of classes which have additional information in mapping files
Lost inner classes bug fixed (example legacy). Lost key columns bug fixed (example manytomany)
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-24 17:29:25 UTC (rev 2638)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-24 17:33:33 UTC (rev 2639)
@@ -443,21 +443,27 @@
} else /* if (collection.isMap() || collection.isSet()) */ {
childShape = getOrCreateDatabaseTable(collection.getCollectionTable());
- Shape keyShape = childShape.getChild((Column)((DependantValue)((Shape)componentShape.getChildren().get(0)).getOrmElement()).getColumnIterator().next());
- if(!isConnectionExist((Shape)componentShape.getChildren().get(0), keyShape)){
- new Connection((Shape)componentShape.getChildren().get(0), keyShape);
- ((Shape)componentShape.getChildren().get(0)).firePropertyChange(REFRESH, null, null);
- keyShape.firePropertyChange(REFRESH, null, null);
+ Iterator columnIterator = ((DependantValue)((Shape)componentShape.getChildren().get(0)).getOrmElement()).getColumnIterator();
+ while (columnIterator.hasNext()) {
+ Shape keyShape = childShape.getChild((Column)(columnIterator.next()));
+ if(!isConnectionExist((Shape)componentShape.getChildren().get(0), keyShape)){
+ new Connection((Shape)componentShape.getChildren().get(0), keyShape);
+ ((Shape)componentShape.getChildren().get(0)).firePropertyChange(REFRESH, null, null);
+ keyShape.firePropertyChange(REFRESH, null, null);
+ }
}
Iterator iter = ((SimpleValue)((Shape)componentShape.getChildren().get(1)).getOrmElement()).getColumnIterator();
while (iter.hasNext()) {
- Column col = (Column)iter.next();
- Shape elementShape = childShape.getChild(col);
- if(!isConnectionExist((Shape)componentShape.getChildren().get(1), elementShape)){
- new Connection((Shape)componentShape.getChildren().get(1), elementShape);
- ((Shape)componentShape.getChildren().get(1)).firePropertyChange(REFRESH, null, null);
- elementShape.firePropertyChange(REFRESH, null, null);
+ Object element = iter.next();
+ if (element instanceof Column) {
+ Column col = (Column)element;
+ Shape elementShape = childShape.getChild(col);
+ if(!isConnectionExist((Shape)componentShape.getChildren().get(1), elementShape)){
+ new Connection((Shape)componentShape.getChildren().get(1), elementShape);
+ ((Shape)componentShape.getChildren().get(1)).firePropertyChange(REFRESH, null, null);
+ elementShape.firePropertyChange(REFRESH, null, null);
+ }
}
}
}
@@ -484,11 +490,13 @@
tableShape.firePropertyChange(REFRESH, null, null);
}
Shape parentShape = ((SpecialOrmShape)classShape).getParentShape();
- OrmShape parentClassShape = (OrmShape)elements.get(((Property)parentShape.getOrmElement()).getPersistentClass().getEntityName());
- if(!isConnectionExist(parentShape, parentClassShape)){
- new Connection(parentShape, parentClassShape);
- parentShape.firePropertyChange(REFRESH, null, null);
- parentClassShape.firePropertyChange(REFRESH, null, null);
+ if (parentShape != null) {
+ OrmShape parentClassShape = (OrmShape)elements.get(((Property)parentShape.getOrmElement()).getPersistentClass().getEntityName());
+ if(!isConnectionExist(parentShape, parentClassShape)){
+ new Connection(parentShape, parentClassShape);
+ parentShape.firePropertyChange(REFRESH, null, null);
+ parentClassShape.firePropertyChange(REFRESH, null, null);
+ }
}
}
} else if (property.getValue() instanceof Component) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java 2007-07-24 17:29:25 UTC (rev 2638)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java 2007-07-24 17:33:33 UTC (rev 2639)
@@ -20,6 +20,7 @@
public SpecialOrmShape(SpecialRootClass ioe) {
super(ioe);
+// generate();
}
protected void generate() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialRootClass.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialRootClass.java 2007-07-24 17:29:25 UTC (rev 2638)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialRootClass.java 2007-07-24 17:33:33 UTC (rev 2639)
@@ -43,14 +43,16 @@
setClassName(component.getComponentClassName());
PersistentClass ownerClass = component.getOwner();
if (component.getParentProperty() != null) {
- Property property = null;
- try {
- property = ownerClass.getProperty(component.getParentProperty());
- } catch (Exception e) {}
- if (property == null && ownerClass.getIdentifierProperty().getName().equals(component.getParentProperty())) {
- property = ownerClass.getIdentifierProperty();
- }
- if (property != null) parentProperty = ownerClass.getIdentifierProperty();
+ parentProperty = new Property();
+ parentProperty.setName(component.getParentProperty());
+ parentProperty.setPersistentClass(ownerClass);
+// Property property = null;
+// try {
+// property = ownerClass.getProperty(component.getParentProperty());
+// } catch (Exception e) {
+// property = ownerClass.getIdentifierProperty();
+// }
+// if (property != null) parentProperty = ownerClass.getIdentifierProperty();
}
Iterator iterator = component.getPropertyIterator();
while (iterator.hasNext()) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2007-07-24 17:29:25 UTC (rev 2638)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2007-07-24 17:33:33 UTC (rev 2639)
@@ -220,7 +220,8 @@
Integer.parseInt(Messages.Colors_DatabaseTableG),
Integer.parseInt(Messages.Colors_DatabaseTableB)));
else
- throw new IllegalArgumentException();
+ return ResourceManager.getInstance().getColor(new RGB(255, 0, 0));
+// throw new IllegalArgumentException();
}
protected Color getSelectionColor() {
17 years, 5 months
JBoss Tools SVN: r2638 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-24 13:29:25 -0400 (Tue, 24 Jul 2007)
New Revision: 2638
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
EXIN-217 Default class name for a namespaced component contribution in components.xml is provided.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-24 17:24:49 UTC (rev 2637)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-24 17:29:25 UTC (rev 2638)
@@ -135,7 +135,12 @@
if(isClassAttributeSet(c)) {
component.setClassName(new XMLValueInfo(c, ISeamXmlComponentDeclaration.CLASS));
} else if(c.getModelEntity().getName().equals("FileSeamComponent12")) {
- component.setClassName(getImpliedComponentName(c, source));
+ component.setClassName(getImpliedClassName(c, source));
+ } else {
+ String className = getDefaultClassName(c);
+ if(className != null) {
+ component.setClassName(className);
+ }
}
component.setScope(new XMLValueInfo(c, ISeamXmlComponentDeclaration.SCOPE));
component.setPrecedence(new XMLValueInfo(c, ISeamXmlComponentDeclaration.PRECEDENCE));
@@ -231,7 +236,7 @@
return value != null && value.length() > 0;
}
- private String getImpliedComponentName(XModelObject c, IPath path) {
+ private String getImpliedClassName(XModelObject c, IPath path) {
if(path.toString().endsWith(".jar")) {
String suffix = ".component";
String cn = c.getAttributeValue("name");
@@ -241,7 +246,7 @@
cn = p.getAttributeValue("name") + "." + cn;
p = p.getParent();
}
- return cn;
+ return cn;
} else {
IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if(!f.exists()) return "";
@@ -249,12 +254,35 @@
if(!root.getLocation().isPrefixOf(f.getLocation())) return "";
String relative = f.getLocation().toString().substring(root.getLocation().toString().length());
String suffix = ".component.xml";
- if(!relative.endsWith(suffix)) return null;
- relative = relative.substring(0, relative.length() - suffix.length());
- relative = relative.replace('\\', '/');
- if(relative.startsWith("/")) relative = relative.substring(1);
- return relative.replace('/', '.');
+ if(relative.endsWith(suffix)) {
+ relative = relative.substring(0, relative.length() - suffix.length());
+ relative = relative.replace('\\', '/');
+ if(relative.startsWith("/")) relative = relative.substring(1);
+ return relative.replace('/', '.');
+ }
}
+ return null;
}
+
+ /**
+ * This is only limited to supported namespaces provided by seam.
+ * @param c
+ * @return
+ */
+ private String getDefaultClassName(XModelObject c) {
+ String s = c.getModelEntity().getXMLSubPath();
+ int d = s.indexOf(':');
+ if(d < 0) return null;
+ String namespace = s.substring(0, d);
+ String tag = s.substring(d + 1);
+ String className = "org.jboss.seam." + namespace + ".";
+ String[] parts = tag.split("-");
+ if(parts != null) for (int i = 0; i < parts.length; i++) {
+ if(parts[i].length() < 1) continue;
+ String p = parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1);
+ className += p;
+ }
+ return className;
+ }
}
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r2637 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-24 13:24:49 -0400 (Tue, 24 Jul 2007)
New Revision: 2637
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-609
fixed NPE's, general issue was that code assumed findMembers would always return a valid value.
It doesn't when the file doesn't exist which can easily happen if a user deletes a source directory and doesn't update eclipses java project info about that directory have been removed.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-07-24 17:21:40 UTC (rev 2636)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-07-24 17:24:49 UTC (rev 2637)
@@ -487,8 +487,11 @@
for (int i = 0; i < es.length; i++) {
try {
if(es[i].getEntryKind() == IClasspathEntry.CPE_SOURCE && es[i].getOutputLocation() != null) {
- String s = project.getWorkspace().getRoot().findMember(es[i].getOutputLocation()).getLocation().toString();
- l.add(new java.io.File(s).getCanonicalPath());
+ IResource findMember = project.getWorkspace().getRoot().findMember(es[i].getOutputLocation());
+ if(findMember!=null) {
+ String s = findMember.getLocation().toString();
+ l.add(new java.io.File(s).getCanonicalPath());
+ }
}
} catch (Exception e) {
//ignore - we do not care about non-existent files here.
@@ -499,7 +502,12 @@
String s = null;
String path = es[i].getPath().toString();
if(path.startsWith("/" + project.getName() + "/")) {
- s = project.findMember(es[i].getPath().removeFirstSegments(1)).getLocation().toString();
+ IResource findMember = project.findMember(es[i].getPath().removeFirstSegments(1));
+ if(findMember!=null) {
+ s = findMember.getLocation().toString();
+ } else {
+ s = null;
+ }
} else if(new java.io.File(path).isFile()) {
s = path;
}
@@ -615,7 +623,10 @@
IClasspathEntry[] es = javaProject.getRawClasspath();
for (int i = 0; i < es.length; i++) {
if(es[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- resources.add( ModelPlugin.getWorkspace().getRoot().findMember(es[i].getPath()) );
+ IResource findMember = ModelPlugin.getWorkspace().getRoot().findMember(es[i].getPath());
+ if(findMember!=null) {
+ resources.add( findMember );
+ }
}
}
} catch(CoreException ce) {
17 years, 5 months