JBoss Tools SVN: r18393 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-02 15:36:58 -0500 (Mon, 02 Nov 2009)
New Revision: 18393
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
Log:
jsf2 test project name was updated in test
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2009-11-02 20:05:12 UTC (rev 18392)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2009-11-02 20:36:58 UTC (rev 18393)
@@ -10,6 +10,11 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.test;
+import java.io.File;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.test.util.ResourcesUtils;
import org.jboss.tools.vpe.ui.test.ComponentContentTest;
/**
@@ -53,4 +58,13 @@
protected String getTestProjectName() {
return JsfAllTests.IMPORT_JSF_20_PROJECT_NAME;
}
+
+ @Override
+ protected void setUp() throws Exception {
+ if(!ResourcesPlugin.getWorkspace().getRoot().getProject(JsfAllTests.IMPORT_JSF_20_PROJECT_NAME).isAccessible()) {
+ ResourcesUtils.importProjectIntoWorkspace((JsfTestPlugin.getPluginResourcePath()
+ + File.separator+JsfAllTests.IMPORT_JSF_20_PROJECT_NAME),JsfAllTests.IMPORT_JSF_20_PROJECT_NAME);
+ }
+ }
+
}
15 years, 1 month
JBoss Tools SVN: r18392 - trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-02 15:05:12 -0500 (Mon, 02 Nov 2009)
New Revision: 18392
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java
Log:
JMX core test error was fixed
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java 2009-11-02 20:04:59 UTC (rev 18391)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/DefaultProviderTest.java 2009-11-02 20:05:12 UTC (rev 18392)
@@ -32,6 +32,7 @@
import org.jboss.tools.jmx.core.tree.DomainNode;
import org.jboss.tools.jmx.core.tree.Node;
import org.jboss.tools.jmx.core.tree.Root;
+import org.jboss.tools.test.util.JobUtils;
public class DefaultProviderTest extends TestCase {
protected void setUp() throws Exception {
@@ -81,10 +82,12 @@
null, true);
project = projectProvider.getProject();
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
-
+ JobUtils.waitForIdle();
+
ILaunchConfigurationWorkingCopy wc = createLaunch();
ILaunch launch = wc.launch("run", new NullProgressMonitor());
-
+
+
/* */
IProcess p = launch.getProcesses()[0];
p.getStreamsProxy().getErrorStreamMonitor().addListener(new IStreamListener() {
@@ -127,7 +130,7 @@
boolean found = false;
for( int i = 0; i < children.length; i++ )
- if( children[i] instanceof DomainNode && ((DomainNode)children[i]).getDomain().equals("com.example"))
+ if( children[i] instanceof DomainNode && ((DomainNode)children[i]).getDomain().equals("com.example.mbeans"))
found = true;
assertTrue("Domain \"com.example\" not found", found);
@@ -144,10 +147,10 @@
ILaunchConfigurationWorkingCopy wc = launchConfigType.newInstance(null, "Test1");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "JMX_EXAMPLE");
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "com.example.Main");
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "com.example.mbeans.Main");
wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_PATHS",
new ArrayList(Arrays.asList(new String[] {
- "/JMX_EXAMPLE/src/com/example/Main.java"
+ "/JMX_EXAMPLE/src/com/example/mbeans/Main.java"
})));
wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_TYPES",
new ArrayList(Arrays.asList(new String[] {"1"})));
15 years, 1 month
JBoss Tools SVN: r18391 - trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-11-02 15:04:59 -0500 (Mon, 02 Nov 2009)
New Revision: 18391
Added:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/mbeans/
Removed:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Client.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Hello.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/HelloMBean.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Main.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSample.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSampler.java
trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSamplerMBean.java
Log:
JMX core test error was fixed
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Client.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Client.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Client.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,217 +0,0 @@
-/*
- * Client.java - JMX client that interacts with the JMX agent. It gets
- * attributes and performs operations on the Hello MBean and the QueueSampler
- * MXBean example. It also listens for Hello MBean notifications.
- */
-
-package com.example;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.TreeSet;
-import javax.management.AttributeChangeNotification;
-import javax.management.JMX;
-import javax.management.MBeanServerConnection;
-import javax.management.Notification;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-public class Client {
-
- /**
- * Inner class that will handle the notifications.
- */
- public static class ClientListener implements NotificationListener {
- public void handleNotification(Notification notification,
- Object handback) {
- echo("\nReceived notification:");
- echo("\tClassName: " + notification.getClass().getName());
- echo("\tSource: " + notification.getSource());
- echo("\tType: " + notification.getType());
- echo("\tMessage: " + notification.getMessage());
- if (notification instanceof AttributeChangeNotification) {
- AttributeChangeNotification acn =
- (AttributeChangeNotification) notification;
- echo("\tAttributeName: " + acn.getAttributeName());
- echo("\tAttributeType: " + acn.getAttributeType());
- echo("\tNewValue: " + acn.getNewValue());
- echo("\tOldValue: " + acn.getOldValue());
- }
- }
- }
-
- /* For simplicity, we declare "throws Exception".
- Real programs will usually want finer-grained exception handling. */
- public static void main(String[] args) throws Exception {
- // Create an RMI connector client and
- // connect it to the RMI connector server
- //
- echo("\nCreate an RMI connector client and " +
- "connect it to the RMI connector server");
- JMXServiceURL url =
- new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:9999/jmxrmi");
- JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
-
- // Create listener
- //
- ClientListener listener = new ClientListener();
-
- // Get an MBeanServerConnection
- //
- echo("\nGet an MBeanServerConnection");
- MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
- waitForEnterPressed();
-
- // Get domains from MBeanServer
- //
- echo("\nDomains:");
- String domains[] = mbsc.getDomains();
- Arrays.sort(domains);
- for (String domain : domains) {
- echo("\tDomain = " + domain);
- }
- waitForEnterPressed();
-
- // Get MBeanServer's default domain
- //
- echo("\nMBeanServer default domain = " + mbsc.getDefaultDomain());
-
- // Get MBean count
- //
- echo("\nMBean count = " + mbsc.getMBeanCount());
-
- // Query MBean names
- //
- echo("\nQuery MBeanServer MBeans:");
- Set<ObjectName> names =
- new TreeSet<ObjectName>(mbsc.queryNames(null, null));
- for (ObjectName name : names) {
- echo("\tObjectName = " + name);
- }
- waitForEnterPressed();
-
- // ----------------------
- // Manage the Hello MBean
- // ----------------------
-
- echo("\n>>> Perform operations on Hello MBean <<<");
-
- // Construct the ObjectName for the Hello MBean
- //
- ObjectName mbeanName = new ObjectName("com.example:type=Hello");
-
- // Create a dedicated proxy for the MBean instead of
- // going directly through the MBean server connection
- //
- HelloMBean mbeanProxy =
- JMX.newMBeanProxy(mbsc, mbeanName, HelloMBean.class, true);
-
- // Add notification listener on Hello MBean
- //
- echo("\nAdd notification listener...");
- mbsc.addNotificationListener(mbeanName, listener, null, null);
-
- // Get CacheSize attribute in Hello MBean
- //
- echo("\nCacheSize = " + mbeanProxy.getCacheSize());
-
- // Set CacheSize attribute in Hello MBean
- // Calling "reset" makes the Hello MBean emit a
- // notification that will be received by the registered
- // ClientListener.
- //
- mbeanProxy.setCacheSize(150);
-
- // Sleep for 2 seconds to have time to receive the notification
- //
- echo("\nWaiting for notification...");
- sleep(2000);
-
- // Get CacheSize attribute in Hello MBean
- //
- echo("\nCacheSize = " + mbeanProxy.getCacheSize());
-
- // Invoke "sayHello" in Hello MBean
- //
- echo("\nInvoke sayHello() in Hello MBean...");
- mbeanProxy.sayHello();
-
- // Invoke "add" in Hello MBean
- //
- echo("\nInvoke add(2, 3) in Hello MBean...");
- echo("\nadd(2, 3) = " + mbeanProxy.add(2, 3));
-
- waitForEnterPressed();
-
- // ------------------------------
- // Manage the QueueSampler MXBean
- // ------------------------------
-
- echo("\n>>> Perform operations on QueueSampler MXBean <<<");
-
- // Construct the ObjectName for the QueueSampler MXBean
- //
- ObjectName mxbeanName =
- new ObjectName("com.example:type=QueueSampler");
-
- // Create a dedicated proxy for the MXBean instead of
- // going directly through the MBean server connection
- //
- QueueSamplerMXBean mxbeanProxy =
- JMX.newMXBeanProxy(mbsc, mxbeanName, QueueSamplerMXBean.class);
-
- // Get QueueSample attribute in QueueSampler MXBean
- //
- QueueSample queue1 = mxbeanProxy.getQueueSample();
- echo("\nQueueSample.Date = " + queue1.getDate());
- echo("QueueSample.Head = " + queue1.getHead());
- echo("QueueSample.Size = " + queue1.getSize());
-
- // Invoke "clearQueue" in QueueSampler MXBean
- //
- echo("\nInvoke clearQueue() in QueueSampler MXBean...");
- mxbeanProxy.clearQueue();
-
- // Get QueueSample attribute in QueueSampler MXBean
- //
- QueueSample queue2 = mxbeanProxy.getQueueSample();
- echo("\nQueueSample.Date = " + queue2.getDate());
- echo("QueueSample.Head = " + queue2.getHead());
- echo("QueueSample.Size = " + queue2.getSize());
-
- waitForEnterPressed();
-
- // Close MBeanServer connection
- //
- echo("\nClose the connection to the server");
- jmxc.close();
- echo("\nBye! Bye!");
- }
-
- static void echo(String msg) {
- System.out.println(msg);
- }
-
- private static void sleep(int millis) {
- try {
- Thread.sleep(millis);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- private static void waitForEnterPressed() {
- try {
- echo("\nPress <Enter> to continue...");
- System.in.read();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Hello.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Hello.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Hello.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,98 +0,0 @@
-/*
- * Hello.java - MBean implementation for the Hello MBean. This class must
- * implement all the Java methods declared in the HelloMBean interface,
- * with the appropriate behavior for each one.
- */
-
-package com.example;
-
-import javax.management.*;
-
-public class Hello
- extends NotificationBroadcasterSupport implements HelloMBean {
-
- public void sayHello() {
- System.out.println("hello, world");
- }
-
- public int add(int x, int y) {
- return x + y;
- }
-
- /* Getter for the Name attribute. The pattern shown here is frequent: the
- getter returns a private field representing the attribute value. In our
- case, the attribute value never changes, but for other attributes it
- might change as the application runs. Consider an attribute representing
- statistics such as uptime or memory usage, for example. Being read-only
- just means that it can't be changed through the management interface. */
- public String getName() {
- return this.name;
- }
-
- /* Getter for the CacheSize attribute. The pattern shown here is
- frequent: the getter returns a private field representing the
- attribute value, and the setter changes that field. */
- public int getCacheSize() {
- return this.cacheSize;
- }
-
- /* Setter for the CacheSize attribute. To avoid problems with
- stale values in multithreaded situations, it is a good idea
- for setters to be synchronized. */
- public synchronized void setCacheSize(int size) {
- int oldSize = this.cacheSize;
- this.cacheSize = size;
-
- /* In a real application, changing the attribute would
- typically have effects beyond just modifying the cacheSize
- field. For example, resizing the cache might mean
- discarding entries or allocating new ones. The logic for
- these effects would be here. */
- System.out.println("Cache size now " + this.cacheSize);
-
- /* Construct a notification that describes the change. The
- "source" of a notification is the ObjectName of the MBean
- that emitted it. But an MBean can put a reference to
- itself ("this") in the source, and the MBean server will
- replace this with the ObjectName before sending the
- notification on to its clients.
-
- For good measure, we maintain a sequence number for each
- notification emitted by this MBean.
-
- The oldValue and newValue parameters to the constructor are
- of type Object, so we are relying on Tiger's autoboxing
- here. */
- Notification n =
- new AttributeChangeNotification(this,
- sequenceNumber++,
- System.currentTimeMillis(),
- "CacheSize changed",
- "CacheSize",
- "int",
- oldSize,
- this.cacheSize);
-
- /* Now send the notification using the sendNotification method
- inherited from the parent class NotificationBroadcasterSupport. */
- sendNotification(n);
- }
-
- @Override
- public MBeanNotificationInfo[] getNotificationInfo() {
- String[] types = new String[] {
- AttributeChangeNotification.ATTRIBUTE_CHANGE
- };
- String name = AttributeChangeNotification.class.getName();
- String description = "An attribute of this MBean has changed";
- MBeanNotificationInfo info =
- new MBeanNotificationInfo(types, name, description);
- return new MBeanNotificationInfo[] {info};
- }
-
- private final String name = "Reginald";
- private int cacheSize = DEFAULT_CACHE_SIZE;
- private static final int DEFAULT_CACHE_SIZE = 200;
-
- private long sequenceNumber = 1;
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/HelloMBean.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/HelloMBean.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/HelloMBean.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,27 +0,0 @@
-/*
- * HelloMBean.java - MBean interface describing the management operations and
- * attributes for the Hello World MBean. In this case there are two operations,
- * "sayHello" and "add", and two attributes, "Name" and "CacheSize".
- */
-
-package com.example;
-
-public interface HelloMBean {
- //-----------
- // operations
- //-----------
-
- public void sayHello();
- public int add(int x, int y);
-
- //-----------
- // attributes
- //-----------
-
- // a read-only attribute called Name of type String
- public String getName();
-
- // a read-write attribute called CacheSize of type int
- public int getCacheSize();
- public void setCacheSize(int size);
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Main.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Main.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/Main.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,50 +0,0 @@
-/*
- * Main.java - main class for the Hello MBean and QueueSampler MXBean example.
- * Create the Hello MBean and QueueSampler MXBean, register them in the platform
- * MBean server, then wait forever (or until the program is interrupted).
- *
- * http://java.sun.com/docs/books/tutorial/jmx/remote/jconsole.html
- */
-
-package com.example;
-
-import java.lang.management.ManagementFactory;
-import java.util.Queue;
-import java.util.concurrent.ArrayBlockingQueue;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-public class Main {
- /* For simplicity, we declare "throws Exception".
- Real programs will usually want finer-grained exception handling. */
- public static void main(String[] args) throws Exception {
- // Get the Platform MBean Server
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-
- // Construct the ObjectName for the Hello MBean we will register
- ObjectName mbeanName = new ObjectName("com.example:type=Hello");
-
- // Create the Hello World MBean
- Hello mbean = new Hello();
-
- // Register the Hello World MBean
- mbs.registerMBean(mbean, mbeanName);
-
- // Construct the ObjectName for the QueueSampler MXBean we will register
- ObjectName mxbeanName = new ObjectName("com.example:type=QueueSampler");
-
- // Create the Queue Sampler MXBean
- Queue<String> queue = new ArrayBlockingQueue<String>(10);
- queue.add("Request-1");
- queue.add("Request-2");
- queue.add("Request-3");
- QueueSampler mxbean = new QueueSampler(queue);
-
- // Register the Queue Sampler MXBean
- mbs.registerMBean(mxbean, mxbeanName);
-
- // Wait forever
- System.out.println("Waiting for incoming requests...");
- Thread.sleep(Long.MAX_VALUE);
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSample.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSample.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSample.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,36 +0,0 @@
-/*
- * QueueSample.java - Java type representing a snapshot of a given queue.
- * It bundles together the instant time the snapshot was taken, the queue
- * size and the queue head.
- */
-
-package com.example;
-
-import java.beans.ConstructorProperties;
-import java.util.Date;
-
-public class QueueSample {
-
- private final Date date;
- private final int size;
- private final String head;
-
- @ConstructorProperties({"date", "size", "head"})
- public QueueSample(Date date, int size, String head) {
- this.date = date;
- this.size = size;
- this.head = head;
- }
-
- public Date getDate() {
- return date;
- }
-
- public int getSize() {
- return size;
- }
-
- public String getHead() {
- return head;
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSampler.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSampler.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSampler.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,31 +0,0 @@
-/*
- * QueueSampler.java - MXBean implementation for the QueueSampler MXBean.
- * This class must implement all the Java methods declared in the
- * QueueSamplerMXBean interface, with the appropriate behavior for each one.
- */
-
-package com.example;
-
-import java.util.Date;
-import java.util.Queue;
-
-public class QueueSampler implements QueueSamplerMBean {
-
- private Queue<String> queue;
-
- public QueueSampler(Queue<String> queue) {
- this.queue = queue;
- }
-
- public QueueSample getQueueSample() {
- synchronized (queue) {
- return new QueueSample(new Date(), queue.size(), queue.peek());
- }
- }
-
- public void clearQueue() {
- synchronized (queue) {
- queue.clear();
- }
- }
-}
Deleted: trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSamplerMBean.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSamplerMBean.java 2009-11-02 15:50:34 UTC (rev 18390)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/projects/JMX_EXAMPLE/src/com/example/QueueSamplerMBean.java 2009-11-02 20:04:59 UTC (rev 18391)
@@ -1,12 +0,0 @@
-/*
- * QueueSamplerMXBean.java - MXBean interface describing the management
- * operations and attributes for the QueueSampler MXBean. In this case
- * there is a read-only attribute "QueueSample" and an operation "clearQueue".
- */
-
-package com.example;
-
-public interface QueueSamplerMBean {
- public QueueSample getQueueSample();
- public void clearQueue();
-}
15 years, 1 month
JBoss Tools SVN: r18389 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-02 10:34:47 -0500 (Mon, 02 Nov 2009)
New Revision: 18389
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5110
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-11-02 15:00:19 UTC (rev 18388)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-11-02 15:34:47 UTC (rev 18389)
@@ -275,13 +275,17 @@
return;
}
if (!project.exists()) {
- for (int i = 0; i < dotFilesList.length; i++) {
- File file = projectLocation.append(dotFilesList[i]).toFile();
- if (file.exists()) FileUtil.remove(file);
- }
+ removeDotFiles(projectLocation);
}
}
+ protected void removeDotFiles(IPath projectLocation) {
+ for (int i = 0; i < dotFilesList.length; i++) {
+ File file = projectLocation.append(dotFilesList[i]).toFile();
+ if (file.exists()) FileUtil.remove(file);
+ }
+ }
+
/*
*
*/
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-11-02 15:00:19 UTC (rev 18388)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-11-02 15:34:47 UTC (rev 18389)
@@ -184,5 +184,12 @@
return true;
}
+ protected void removeDotFiles(IPath projectLocation) {
+ if(isLinkingToProjectOutsideWorkspace()) {
+ return;
+ } else {
+ super.removeDotFiles(projectLocation);
+ }
+ }
}
15 years, 1 month
JBoss Tools SVN: r18388 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram: editors and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-11-02 10:00:19 -0500 (Mon, 02 Nov 2009)
New Revision: 18388
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/fanConnectionRouter.png
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/manhattanConnectionRouter.png
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ActionMenu.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/ConnectionEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5124 - fixed
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -63,4 +63,6 @@
public static String Diagram_incorrect_state;
public static String Diagram_no_items_or_incorrect_state;
public static String OpenDiagramActionDelegate_could_not_load_configuration;
+ public static String ConnectionRouterFanAction_select_fan_connection_router;
+ public static String ConnectionRouterManhattanAction_select_manhattan_connection_router;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/DiagramViewerMessages.properties 2009-11-02 15:00:19 UTC (rev 18388)
@@ -39,3 +39,5 @@
Diagram_incorrect_state=incorrect Hibernate Console Configuration state.
Diagram_no_items_or_incorrect_state=no items or incorrect Hibernate Console Configuration state.
OpenDiagramActionDelegate_could_not_load_configuration=Could not load configuration
+ConnectionRouterFanAction_select_fan_connection_router=Select fan connection router
+ConnectionRouterManhattanAction_select_manhattan_connection_router=Select manhattan connection router
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -33,6 +33,8 @@
import org.jboss.tools.hibernate.ui.diagram.UiPlugin;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ActionMenu;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterFanAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterManhattanAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleAssociationAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleClassMappingAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleConnectionsAction;
@@ -75,14 +77,14 @@
DiagramBaseRetargetAction diagramAction2 = new DiagramBaseRetargetAction(
ToggleShapeExpandStateAction.ACTION_ID,
DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state,
- DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state,
+ DiagramViewerMessages.ToggleShapeExpandStateAction_toggle_expand_state_tooltip,
ToggleShapeExpandStateAction.img);
addRetargetAction(diagramAction2);
//
diagramAction = new DiagramBaseRetargetAction(
ToggleShapeVisibleStateAction.ACTION_ID,
DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state,
- DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state,
+ DiagramViewerMessages.ToggleShapeVisibleStateAction_toggle_visible_state_tooltip,
ToggleShapeVisibleStateAction.img);
addRetargetAction(diagramAction);
//
@@ -114,11 +116,28 @@
ToggleForeignKeyConstraintAction.img, IAction.AS_CHECK_BOX);
addRetargetAction(diagramAction);
//
- act = new Action[4];
+ diagramAction = new DiagramBaseRetargetAction(
+ ConnectionRouterManhattanAction.ACTION_ID,
+ DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router,
+ DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router,
+ ConnectionRouterManhattanAction.img, IAction.AS_RADIO_BUTTON);
+ addRetargetAction(diagramAction);
+ //
+ diagramAction = new DiagramBaseRetargetAction(
+ ConnectionRouterFanAction.ACTION_ID,
+ DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router,
+ DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router,
+ ConnectionRouterFanAction.img, IAction.AS_RADIO_BUTTON);
+ addRetargetAction(diagramAction);
+ //
+ act = new Action[7];
act[0] = (Action)getAction(TogglePropertyMappingAction.ACTION_ID);
act[1] = (Action)getAction(ToggleClassMappingAction.ACTION_ID);
act[2] = (Action)getAction(ToggleAssociationAction.ACTION_ID);
act[3] = (Action)getAction(ToggleForeignKeyConstraintAction.ACTION_ID);
+ act[4] = null;
+ act[5] = (Action)getAction(ConnectionRouterManhattanAction.ACTION_ID);
+ act[6] = (Action)getAction(ConnectionRouterFanAction.ACTION_ID);
diagramAction1.setMenuCreator(new ActionMenu(act));
//
addRetargetAction(new UndoRetargetAction());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -66,6 +66,8 @@
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ActionMenu;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.AutoLayoutAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.CollapseAllAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterFanAction;
+import org.jboss.tools.hibernate.ui.diagram.editors.actions.ConnectionRouterManhattanAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExpandAllAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ExportImageAction;
import org.jboss.tools.hibernate.ui.diagram.editors.actions.LexicalSortingAction;
@@ -82,6 +84,7 @@
import org.jboss.tools.hibernate.ui.diagram.editors.actions.ToggleShapeVisibleStateAction;
import org.jboss.tools.hibernate.ui.diagram.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.ui.diagram.editors.model.Shape;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.DiagramEditPart;
import org.jboss.tools.hibernate.ui.diagram.editors.parts.GEFRootEditPart;
import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPart;
import org.jboss.tools.hibernate.ui.diagram.editors.parts.OrmEditPartFactory;
@@ -246,6 +249,12 @@
action = new TogglePropertyMappingAction(this);
registry.registerAction(action);
+ action = new ConnectionRouterFanAction(this);
+ registry.registerAction(action);
+
+ action = new ConnectionRouterManhattanAction(this);
+ registry.registerAction(action);
+
action = new ToggleShapeExpandStateAction(this);
registry.registerAction(action);
getSelectionActions().add(action.getId());
@@ -269,11 +278,14 @@
action = new LexicalSortingAction(this, null);
registry.registerAction(action);
- Action[] act = new Action[4];
+ Action[] act = new Action[7];
act[0] = (Action)registry.getAction(TogglePropertyMappingAction.ACTION_ID);
act[1] = (Action)registry.getAction(ToggleClassMappingAction.ACTION_ID);
act[2] = (Action)registry.getAction(ToggleAssociationAction.ACTION_ID);
act[3] = (Action)registry.getAction(ToggleForeignKeyConstraintAction.ACTION_ID);
+ act[4] = null;
+ act[5] = (Action)registry.getAction(ConnectionRouterManhattanAction.ACTION_ID);
+ act[6] = (Action)registry.getAction(ConnectionRouterFanAction.ACTION_ID);
actionToggleConnections.setMenuCreator(new ActionMenu(act));
}
@@ -606,4 +618,18 @@
public IAction getLexicalSortingAction() {
return getActionRegistry().getAction(LexicalSortingAction.ACTION_ID);
}
+
+ public GEFRootEditPart getRootEditPart() {
+ return gefRootEditPart;
+ }
+
+ public DiagramEditPart getDiagramEditPart() {
+ if (!gefRootEditPart.getChildren().isEmpty()) {
+ Object obj = gefRootEditPart.getChildren().get(0);
+ if (obj instanceof DiagramEditPart) {
+ return (DiagramEditPart)obj;
+ }
+ }
+ return null;
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ActionMenu.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ActionMenu.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ActionMenu.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -13,6 +13,7 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.Separator;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
@@ -73,7 +74,12 @@
}
protected void addActionToMenu(Menu parent, Action action) {
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(parent, -1);
+ if (action == null) {
+ Separator item = new Separator();
+ item.fill(parent, -1);
+ } else {
+ ActionContributionItem item = new ActionContributionItem(action);
+ item.fill(parent, -1);
+ }
}
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterFanAction.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.DiagramEditPart;
+
+/**
+ * Connect figures with direct line connections
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ConnectionRouterFanAction extends DiagramBaseAction {
+
+ public static final String ACTION_ID = "connectionRouterFanId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/fanConnectionRouter.png"); //$NON-NLS-1$
+
+ public ConnectionRouterFanAction(DiagramViewer editor) {
+ super(editor, AS_RADIO_BUTTON);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router);
+ setToolTipText(DiagramViewerMessages.ConnectionRouterFanAction_select_fan_connection_router);
+ setImageDescriptor(img);
+ }
+
+ public void run() {
+ DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
+ if (diagramEditPart != null) {
+ diagramEditPart.setupFanConnectionRouter();
+ }
+ }
+
+ public boolean isChecked() {
+ DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
+ if (diagramEditPart != null) {
+ return diagramEditPart.isFanConnectionRouter();
+ }
+ return super.isChecked();
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ConnectionRouterManhattanAction.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.ui.diagram.editors.actions;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
+import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
+import org.jboss.tools.hibernate.ui.diagram.editors.parts.DiagramEditPart;
+
+/**
+ * Connect figures with bend line connections
+ *
+ * @author Vitali Yemialyanchyk
+ */
+public class ConnectionRouterManhattanAction extends DiagramBaseAction {
+
+ public static final String ACTION_ID = "connectionRouterManhattanId"; //$NON-NLS-1$
+ public static final ImageDescriptor img =
+ ImageDescriptor.createFromFile(DiagramViewer.class, "icons/manhattanConnectionRouter.png"); //$NON-NLS-1$
+
+ public ConnectionRouterManhattanAction(DiagramViewer editor) {
+ super(editor, AS_RADIO_BUTTON);
+ setId(ACTION_ID);
+ setText(DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router);
+ setToolTipText(DiagramViewerMessages.ConnectionRouterManhattanAction_select_manhattan_connection_router);
+ setImageDescriptor(img);
+ }
+
+ public void run() {
+ DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
+ if (diagramEditPart != null) {
+ diagramEditPart.setupManhattanConnectionRouter();
+ }
+ }
+
+ public boolean isChecked() {
+ DiagramEditPart diagramEditPart = getDiagramViewer().getDiagramEditPart();
+ if (diagramEditPart != null) {
+ return diagramEditPart.isManhattanConnectionRouter();
+ }
+ return super.isChecked();
+ }
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/fanConnectionRouter.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/fanConnectionRouter.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/manhattanConnectionRouter.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/icons/manhattanConnectionRouter.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -96,6 +96,7 @@
protected double zoom = 1.0;
protected float fontHeight = 8.5f;
protected boolean deepIntoSort = false;
+ protected boolean flagManhattanConnectionRouter = true;
//
private boolean fileLoadSuccessfull = false;
// this is workaround to load diagram state in the case if Console Config loaded later
@@ -506,6 +507,7 @@
gridEnabled = getPrValue(memento, "gridEnabled", false); //$NON-NLS-1$
zoom = getPrValue(memento, "zoom", 1.0); //$NON-NLS-1$
deepIntoSort = getPrValue(memento, "deepIntoSort", false); //$NON-NLS-1$
+ flagManhattanConnectionRouter = getPrValue(memento, "flagManhattanConnectionRouter", true); //$NON-NLS-1$
connectionsVisibilityAssociation = getPrValue(memento, "connectionsVisibilityAssociation", true); //$NON-NLS-1$
connectionsVisibilityClassMapping = getPrValue(memento, "connectionsVisibilityClassMapping", true); //$NON-NLS-1$
connectionsVisibilityForeignKeyConstraint = getPrValue(memento, "connectionsVisibilityForeignKeyConstraint", true); //$NON-NLS-1$
@@ -532,6 +534,7 @@
gridEnabled = getPrValue(properties, "gridEnabled", false); //$NON-NLS-1$
zoom = getPrValue(properties, "zoom", 1.0); //$NON-NLS-1$
deepIntoSort = getPrValue(properties, "deepIntoSort", false); //$NON-NLS-1$
+ flagManhattanConnectionRouter = getPrValue(properties, "flagManhattanConnectionRouter", true); //$NON-NLS-1$
connectionsVisibilityAssociation = getPrValue(properties, "connectionsVisibilityAssociation", true); //$NON-NLS-1$
connectionsVisibilityClassMapping = getPrValue(properties, "connectionsVisibilityClassMapping", true); //$NON-NLS-1$
connectionsVisibilityForeignKeyConstraint = getPrValue(properties, "connectionsVisibilityForeignKeyConstraint", true); //$NON-NLS-1$
@@ -551,6 +554,7 @@
setPrValue(memento, "gridEnabled", "" + gridEnabled); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(memento, "zoom", "" + zoom); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(memento, "deepIntoSort", "" + deepIntoSort); //$NON-NLS-1$ //$NON-NLS-2$
+ setPrValue(memento, "flagManhattanConnectionRouter", "" + flagManhattanConnectionRouter); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(memento, "connectionsVisibilityAssociation", "" + connectionsVisibilityAssociation); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(memento, "connectionsVisibilityClassMapping", "" + connectionsVisibilityClassMapping); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(memento, "connectionsVisibilityForeignKeyConstraint", "" + connectionsVisibilityForeignKeyConstraint); //$NON-NLS-1$ //$NON-NLS-2$
@@ -570,6 +574,7 @@
setPrValue(properties, "gridEnabled", "" + gridEnabled); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(properties, "zoom", "" + zoom); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(properties, "deepIntoSort", "" + deepIntoSort); //$NON-NLS-1$ //$NON-NLS-2$
+ setPrValue(properties, "flagManhattanConnectionRouter", "" + flagManhattanConnectionRouter); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(properties, "connectionsVisibilityAssociation", "" + connectionsVisibilityAssociation); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(properties, "connectionsVisibilityClassMapping", "" + connectionsVisibilityClassMapping); //$NON-NLS-1$ //$NON-NLS-2$
setPrValue(properties, "connectionsVisibilityForeignKeyConstraint", "" + connectionsVisibilityForeignKeyConstraint); //$NON-NLS-1$ //$NON-NLS-2$
@@ -944,4 +949,20 @@
elements.get(entry.getKey()).setExpanded(entry.getValue());
}
}
+
+ public boolean isManhattanConnectionRouter() {
+ return flagManhattanConnectionRouter;
+ }
+
+ public boolean isFanConnectionRouter() {
+ return !flagManhattanConnectionRouter;
+ }
+
+ public void setupManhattanConnectionRouter() {
+ flagManhattanConnectionRouter = true;
+ }
+
+ public void setupFanConnectionRouter() {
+ flagManhattanConnectionRouter = false;
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/ConnectionEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/ConnectionEditPart.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/ConnectionEditPart.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -36,7 +36,7 @@
/**
* @author some modifications from Vitali
*/
-class ConnectionEditPart extends AbstractConnectionEditPart
+public class ConnectionEditPart extends AbstractConnectionEditPart
implements PropertyChangeListener, EditPartListener {
public void activate() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java 2009-11-02 13:19:08 UTC (rev 18387)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/parts/DiagramEditPart.java 2009-11-02 15:00:19 UTC (rev 18388)
@@ -16,6 +16,7 @@
import java.util.List;
import org.eclipse.draw2d.ConnectionLayer;
+import org.eclipse.draw2d.FanRouter;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.FreeformLayer;
import org.eclipse.draw2d.FreeformLayout;
@@ -44,7 +45,7 @@
/**
* @author some modifications from Vitali
*/
-class DiagramEditPart extends OrmEditPart {
+public class DiagramEditPart extends OrmEditPart {
protected void createEditPolicies() {
installEditPolicy(EditPolicy.LAYOUT_ROLE,
@@ -55,16 +56,40 @@
Figure f = new FreeformLayer();
f.setBorder(new MarginBorder(3));
f.setLayoutManager(new FreeformLayout());
+ if (isManhattanConnectionRouter()) {
+ getOrmDiagram().setupFanConnectionRouter();
+ setupManhattanConnectionRouter();
+ } else {
+ getOrmDiagram().setupManhattanConnectionRouter();
+ setupFanConnectionRouter();
+ }
+ return f;
+ }
- ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
- connLayer.setConnectionRouter(new ManhattanConnectionRouter());
- //connLayer.setConnectionRouter(new ShortestPathConnectionRouter());
- //connLayer.setConnectionRouter(new BendpointConnectionRouter());
- //connLayer.setConnectionRouter(new FanRouter());
+ public void setupManhattanConnectionRouter() {
+ if (!isManhattanConnectionRouter()) {
+ ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
+ connLayer.setConnectionRouter(new ManhattanConnectionRouter());
+ getOrmDiagram().setupManhattanConnectionRouter();
+ }
+ }
- return f;
+ public void setupFanConnectionRouter() {
+ if (!isFanConnectionRouter()) {
+ ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
+ connLayer.setConnectionRouter(new FanRouter());
+ getOrmDiagram().setupFanConnectionRouter();
+ }
}
+ public boolean isManhattanConnectionRouter() {
+ return getOrmDiagram().isManhattanConnectionRouter();
+ }
+
+ public boolean isFanConnectionRouter() {
+ return getOrmDiagram().isFanConnectionRouter();
+ }
+
/**
* @see java.beans.PropertyChangeListener#propertyChange(PropertyChangeEvent)
*/
15 years, 1 month
JBoss Tools SVN: r18386 - in workspace/yradtsevich/DnD: tags and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-11-02 08:06:56 -0500 (Mon, 02 Nov 2009)
New Revision: 18386
Added:
workspace/yradtsevich/DnD/branches/
workspace/yradtsevich/DnD/tags/
workspace/yradtsevich/DnD/tags/DnDJsPrototype-1.0/
workspace/yradtsevich/DnD/trunk/
workspace/yradtsevich/DnD/trunk/DndJsPrototype/
Removed:
workspace/yradtsevich/DnD/DndJsPrototype/
Log:
JavaScript prototype for Drag&Drop in VPE (https://jira.jboss.org/jira/browse/JBIDE-5042 ).
- Files moved
Copied: workspace/yradtsevich/DnD/trunk/DndJsPrototype (from rev 18385, workspace/yradtsevich/DnD/DndJsPrototype)
15 years, 1 month
JBoss Tools SVN: r18384 - workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-11-02 07:46:12 -0500 (Mon, 02 Nov 2009)
New Revision: 18384
Modified:
workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/dragIcon.gif
workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/index.html
workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/script.js
Log:
JavaScript prototype for Drag&Drop in VPE (https://jira.jboss.org/jira/browse/JBIDE-5042 ). MIME types have been set.
Property changes on: workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/dragIcon.gif
___________________________________________________________________
Name: svn:mime-type
- application/octet-stream
+ image/gif
Property changes on: workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Property changes on: workspace/yradtsevich/mock/DnD/DndJsPrototype/WebContent/script.js
___________________________________________________________________
Name: svn:mime-type
+ application/javascript
15 years, 1 month