JBoss Tools SVN: r24126 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-12 17:01:42 -0400 (Thu, 12 Aug 2010)
New Revision: 24126
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/CVMessages.java (getFormattedString): New method.
* src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: Add new messages.
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (PerformDestroyInstanceActionThread.run):
Rewrite as Job run method.
(PerformInstanceActionThread.run): Ditto.
(PerformInstanceActionThread): Rewrite to inherit from Job.
(PerformDestroyInstanceActionThread): Ditto.
(PerformDestroyInstanceActionThread.PerformDestroyInstanceActionThread): Change constructor to
take title and task name.
(PerformInstanceActionThread.PerformInstanceActionThread): Ditto.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-12 20:52:22 UTC (rev 24125)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-12 21:01:42 UTC (rev 24126)
@@ -1,5 +1,18 @@
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/ui/views/CVMessages.java (getFormattedString): New method.
+ * src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: Add new messages.
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (PerformDestroyInstanceActionThread.run):
+ Rewrite as Job run method.
+ (PerformInstanceActionThread.run): Ditto.
+ (PerformInstanceActionThread): Rewrite to inherit from Job.
+ (PerformDestroyInstanceActionThread): Ditto.
+ (PerformDestroyInstanceActionThread.PerformDestroyInstanceActionThread): Change constructor to
+ take title and task name.
+ (PerformInstanceActionThread.PerformInstanceActionThread): Ditto.
+
+2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
+
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (changeEvent): Don't
mark as override.
(listChanged): Ditto.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java 2010-08-12 20:52:22 UTC (rev 24125)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.java 2010-08-12 21:01:42 UTC (rev 24126)
@@ -1,5 +1,6 @@
package org.jboss.tools.deltacloud.ui.views;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -16,5 +17,12 @@
return '#' + key + '#';
}
}
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-08-12 20:52:22 UTC (rev 24125)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-08-12 21:01:42 UTC (rev 24126)
@@ -28,6 +28,13 @@
Reboot.label=Reboot
Destroy.label=Destroy
+StartingInstance.title=Starting Instance
+StartingInstance.msg=Starting Instance: {0}
+StoppingInstance.title=Stopping Instance
+StoppingInstance.msg=Stopping Instance: {0}
+RebootingInstance.title=Rebooting Instance
+RebootingInstance.msg=Rebooting Instance: {0}
+
NAME=Name
ID=ID
HOSTNAME=Public Hostname
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-12 20:52:22 UTC (rev 24125)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-12 21:01:42 UTC (rev 24126)
@@ -4,6 +4,10 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
@@ -54,7 +58,16 @@
private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
+ private final static String STOPPING_INSTANCE_TITLE = "StoppingInstance.title"; //$NON-NLS-1$
+ private final static String STOPPING_INSTANCE_MSG = "StoppingInstance.msg"; //$NON-NLS-1$
+ private final static String REBOOTING_INSTANCE_TITLE = "RebootingInstance.title"; //$NON-NLS-1$
+ private final static String REBOOTING_INSTANCE_MSG = "RebootingInstance.msg"; //$NON-NLS-1$
+ private final static String DESTROYING_INSTANCE_TITLE = "DestroyingInstance.title"; //$NON-NLS-1$
+ private final static String DESTROYING_INSTANCE_MSG = "DestroyingInstance.msg"; //$NON-NLS-1$
+
private TableViewer viewer;
private Composite container;
private Combo cloudSelector;
@@ -252,50 +265,69 @@
//TODO
}
- private class PerformInstanceActionThread extends Thread {
+ private class PerformInstanceActionThread extends Job {
private DeltaCloud cloud;
private DeltaCloudInstance instance;
private String action;
+ private String taskName;
- public PerformInstanceActionThread(DeltaCloud cloud, DeltaCloudInstance instance, String action) {
- super();
+ public PerformInstanceActionThread(DeltaCloud cloud, DeltaCloudInstance instance,
+ String action, String title, String taskName) {
+ super(title);
this.cloud = cloud;
this.instance = instance;
this.action = action;
+ this.taskName = taskName;
}
@Override
- public void run() {
- cloud.performInstanceAction(instance.getId(), action);
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- refreshInstance(instance);
- }
- });
-
+ public IStatus run(IProgressMonitor pm) {
+ try {
+ pm.beginTask(taskName, IProgressMonitor.UNKNOWN);
+ pm.worked(1);
+ cloud.performInstanceAction(instance.getId(), action);
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ refreshInstance(instance);
+ }
+ });
+ } finally {
+ pm.done();
+ }
+ return Status.OK_STATUS;
}
}
- private class PerformDestroyInstanceActionThread extends Thread {
+ private class PerformDestroyInstanceActionThread extends Job {
private DeltaCloud cloud;
private DeltaCloudInstance instance;
+ private String taskName;
- public PerformDestroyInstanceActionThread(DeltaCloud cloud, DeltaCloudInstance instance) {
- super();
+ public PerformDestroyInstanceActionThread(DeltaCloud cloud, DeltaCloudInstance instance,
+ String title, String taskName) {
+ super(title);
this.cloud = cloud;
this.instance = instance;
+ this.taskName = taskName;
}
- @Override
- public void run() {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- cloud.destroyInstance(instance.getId());
- }
- });
- }
+ @Override
+ public IStatus run(IProgressMonitor pm) {
+ try {
+ pm.beginTask(taskName, IProgressMonitor.UNKNOWN);
+ pm.worked(1);
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ cloud.destroyInstance(instance.getId());
+ }
+ });
+ } finally {
+ pm.done();
+ }
+ return Status.OK_STATUS;
+ }
}
private void makeActions() {
@@ -310,8 +342,11 @@
public void run() {
ISelection selection = viewer.getSelection();
DeltaCloudInstance instance = (DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.START);
- t.start();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.START,
+ CVMessages.getString(STARTING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[]{instance.getName()}));
+ t.setUser(true);
+ t.schedule();
}
};
startAction.setText(CVMessages.getString(START_LABEL));
@@ -321,8 +356,11 @@
public void run() {
ISelection selection = viewer.getSelection();
DeltaCloudInstance instance = (DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.STOP);
- t.start();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.STOP,
+ CVMessages.getString(STOPPING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[]{instance.getName()}));
+ t.setUser(true);
+ t.schedule();
}
};
stopAction.setText(CVMessages.getString(STOP_LABEL));
@@ -332,8 +370,11 @@
public void run() {
ISelection selection = viewer.getSelection();
DeltaCloudInstance instance = (DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.REBOOT);
- t.start();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.REBOOT,
+ CVMessages.getString(REBOOTING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[]{instance.getName()}));
+ t.setUser(true);
+ t.schedule();
}
};
rebootAction.setText(CVMessages.getString(REBOOT_LABEL));
@@ -343,8 +384,11 @@
public void run() {
ISelection selection = viewer.getSelection();
DeltaCloudInstance instance = (DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
- PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(currCloud, instance);
- t.start();
+ PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(currCloud, instance,
+ CVMessages.getString(DESTROYING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(DESTROYING_INSTANCE_MSG, new String[]{instance.getName()}));
+ t.setUser(true);
+ t.schedule();
}
};
destroyAction.setText(CVMessages.getString(DESTROY_LABEL));
15 years, 8 months
JBoss Tools SVN: r24125 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: types and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-12 16:52:22 -0400 (Thu, 12 Aug 2010)
New Revision: 24125
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
restore last commit to ui.bot.ext plugin
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-08-12 20:52:00 UTC (rev 24124)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-08-12 20:52:22 UTC (rev 24125)
@@ -21,13 +21,19 @@
import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Decorations;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.results.WidgetResult;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
@@ -277,6 +283,191 @@
}
});
}
+ /**
+ * Returns tree menu which contains menuLabel
+ * @param tree
+ * @param menuLabel
+ * @return
+ */
+ public static Menu getTreeMenuViaReflections (final Tree tree, final String menuLabel){
+ // Menu has to be already created
+ return UIThreadRunnable.syncExec(new WidgetResult<Menu>() {
+ public Menu run() {
+ Menu result = null;
+ Composite parent = tree.getParent();
+ while (!(parent instanceof Decorations)){
+ parent = parent.getParent();
+ }
+ try {
+ Menu[] menus = ReflectionsHelper.getPrivateFieldValue(Decorations.class,
+ "menus",
+ parent,
+ Menu[].class);
+ if (menus != null){
+ MenuItem topMenuItem = null;
+ int index = menus.length - 1;
+ while (topMenuItem == null && index >= 0){
+ if (menus[index] != null){
+ MenuItem[] menuItems = menus[index].getItems();
+ int menuItemIndex = 0;
+ while (topMenuItem == null && menuItemIndex < menuItems.length){
+ if (menuItems[menuItemIndex].getText().equals(menuLabel)){
+ topMenuItem = menuItems[menuItemIndex];
+ }
+ menuItemIndex++;
+ }
+ }
+ index--;
+ }
+ if (topMenuItem != null){
+ result = topMenuItem.getParent();
+ }
+ }
+ else{
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabel);
+ }
+ } catch (SecurityException se) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabel,se);
+ } catch (NoSuchFieldException nsfe) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabel,nsfe);
+ } catch (IllegalArgumentException iae) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabel,iae);
+ } catch (IllegalAccessException iace) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabel,iace);
+ }
+ return result;
+ }});
+ }
+ /**
+ * Simulate Right Click on treeItem
+ * @param tree
+ * @param treeItem
+ */
+ public static void treeRightClick(final Tree tree , final TreeItem treeItem) {
+ Rectangle cellBounds = UIThreadRunnable.syncExec(new Result<Rectangle>() {
+ public Rectangle run() {
+ return treeItem.getBounds();
+ }
+ });
+ clickXY(cellBounds.x + (cellBounds.width / 2), cellBounds.y + (cellBounds.height / 2), tree , treeItem);
+ }
+ /**
+ * Simulate Right Click on treeItem on specified position
+ * @param x
+ * @param y
+ * @param tree
+ * @param treeItem
+ */
+ protected static void clickXY(int x, int y,final Tree tree , final TreeItem treeItem) {
+ notifyTree(SWT.MouseEnter,tree,treeItem);
+ notifyTree(SWT.MouseMove,tree,treeItem);
+ notifyTree(SWT.Activate,tree,treeItem);
+ notifyTree(SWT.FocusIn,tree,treeItem);
+ notifyTree(SWT.MouseDown, createMouseEvent(x, y, 3, SWT.BUTTON3, 1, tree, treeItem),tree);
+ notifyTree(SWT.MouseUp,createMouseEvent(x, y, 3, SWT.BUTTON3, 1, tree, treeItem),tree);
+ notifyTree(SWT.Selection, createEvent(tree,treeItem),tree);
+ notifyTree(SWT.MouseHover,tree,treeItem);
+ notifyTree(SWT.MouseMove,tree,treeItem);
+ notifyTree(SWT.MouseExit,tree,treeItem);
+ notifyTree(SWT.Deactivate,tree,treeItem);
+ notifyTree(SWT.FocusOut,tree,treeItem);
+ }
+ /**
+ * Notify tree with Event of specified eventType
+ * @param eventType
+ * @param tree
+ * @param treeItem
+ */
+ private static void notifyTree(int eventType , Tree tree , TreeItem treeItem) {
+ Event event = new Event();
+ event.time = (int) System.currentTimeMillis();
+ event.widget = tree;
+ event.display = tree.getDisplay();
+ event.item = treeItem;
+ notify(eventType, event, tree);
+ }
+ /**
+ * Notify tree with Event of specified eventType
+ * @param eventType
+ * @param event
+ * @param tree
+ */
+ private static void notifyTree(int eventType , Event event , Tree tree) {
+ notify(eventType, event, tree);
+ }
+ /**
+ * Sends a non-blocking notification of the specified type to the widget.
+ *
+ * @param eventType the type of event.
+ * @param createEvent the event to be sent to the {@link #widget}.
+ * @param widget the widget to send the event to.
+ */
+ protected static void notify(final int eventType, final Event createEvent, final Widget widget) {
+ createEvent.type = eventType;
+ widget.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if ((widget == null) || widget.isDisposed()) {
+ return;
+ }
+ widget.notifyListeners(eventType, createEvent);
+ }
+ });
+ widget.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ // do nothing, just wait for sync.
+ }
+ });
+ }
+ /**
+ * Create a mouse event
+ *
+ * @param x the x co-ordinate of the mouse event.
+ * @param y the y co-ordinate of the mouse event.
+ * @param button the mouse button that was clicked.
+ * @param stateMask the state of the keyboard modifier keys.
+ * @param count the number of times the mouse was clicked.
+ * @return an event that encapsulates {@link #widget} and {@link #display}
+ * @since 1.2
+ */
+ protected static Event createMouseEvent(int x, int y, int button, int stateMask, int count, Tree tree , TreeItem treeItem) {
+ Event event = new Event();
+ event.time = (int) System.currentTimeMillis();
+ event.widget = tree;
+ event.display = tree.getDisplay();
+ event.x = x;
+ event.y = y;
+ event.button = button;
+ event.stateMask = stateMask;
+ event.count = count;
+ event.item = treeItem;
+ return event;
+ }
+ /**
+ * Create default Event for tree and treeItem
+ * @param tree
+ * @param treeItem
+ * @return
+ */
+ protected static Event createEvent(Tree tree, TreeItem treeItem) {
+ Event event = new Event();
+ event.time = (int) System.currentTimeMillis();
+ event.widget = tree;
+ event.display = tree.getDisplay();
+ event.item = treeItem;
+ return event;
+ }
+ /**
+ * Hide menu and all his parent menus
+ * @param menu
+ */
+ public static void hideMenuRecursively(final Menu menu){
+ menu.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ ContextMenuHelper.hide(menu);
+ menu.setVisible(false);
+ }
+ });
+ }
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-08-12 20:52:00 UTC (rev 24124)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-08-12 20:52:22 UTC (rev 24125)
@@ -140,6 +140,11 @@
public static final String COPY_FILE_FROM_GUVNOR_TO_PACKAGE_EXPLORER = "File Operation";
public static final String INSERT_TAG = "Insert Tag";
public static final String SHOW_HIDE_DRAWERS = "Show/Hide Drawers";
+ public static final String PALETTE_EDITOR = "Palette Editor";
+ public static final String CREATE_GROUP = "Create Group";
+ public static final String ADD_PALETTE_GROUP = "Add Palette Group";
+ public static final String ADD_PALETTE_MACRO = "Add Palette Macro";
+ public static final String CONFIRMATION = "Confirmation";
}
public class EntityGroup {
@@ -539,4 +544,36 @@
public static final String SHOW_HIDE_TOOL_ITEM = "Show/Hide";
}
+
+ public static class PaletteEditor{
+
+ public static final String XSTUDIO_NODE = "XStudio";
+ public static final String PALETTE_NODE = "Palette";
+ public static final String NEW_MENU_ITEM = "New";
+ public static final String CREATE_GROUP_MENU_ITEM = "Create Group...";
+ public static final String CREATE_MACRO_MENU_ITEM = "Create Macro...";
+ public static final String DELETE_MENU_ITEM = "Delete";
+
+ }
+
+ public static class CreateGroupDialog{
+
+ public static final String NAME = "Name*";
+
+ }
+
+ public static class AddPaletteGroupDialog{
+
+ public static final String NAME = "Name*";
+
+ }
+
+ public static class AddPaletteMacroDialog{
+
+ public static final String NAME = "Name*";
+ public static final String START_TEXT = "Start Text";
+ public static final String END_TEXT = "End Text";
+
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r24124 - workspace/snjeza/resteasy-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-12 16:52:00 -0400 (Thu, 12 Aug 2010)
New Revision: 24124
Modified:
workspace/snjeza/resteasy-examples/resteasySimple.zip
Log:
https://jira.jboss.org/browse/JBIDE-6547 Found minor bug with RESTeasy example in project examples
Modified: workspace/snjeza/resteasy-examples/resteasySimple.zip
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Tools SVN: r24123 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-12 16:19:00 -0400 (Thu, 12 Aug 2010)
New Revision: 24123
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (destroyInstance): Fix to use
DELETE request.
(sendRequest): Fix to allow DELETE request.
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (destroyInstance): New method.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-12 20:13:25 UTC (rev 24122)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-12 20:19:00 UTC (rev 24123)
@@ -1,3 +1,10 @@
+2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (destroyInstance): Fix to use
+ DELETE request.
+ (sendRequest): Fix to allow DELETE request.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (destroyInstance): New method.
+
2010-08-11 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (performInstanceAction): New method.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-12 20:13:25 UTC (rev 24122)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-12 20:19:00 UTC (rev 24123)
@@ -96,6 +96,25 @@
return instanceArray;
}
+ public DeltaCloudInstance[] destroyInstance(String instanceId) {
+ try {
+ client.destroyInstance(instanceId);
+ for (int i = 0; i < instances.size(); ++i) {
+ DeltaCloudInstance instance = instances.get(i);
+ if (instance.getId().equals(instanceId)) {
+ instances.remove(i);
+ break;
+ }
+ }
+ } catch (DeltaCloudClientException e) {
+ return null;
+ }
+ DeltaCloudInstance[] instanceArray = new DeltaCloudInstance[instances.size()];
+ instanceArray = instances.toArray(instanceArray);
+ notifyInstanceListListeners(instanceArray);
+ return instanceArray;
+ }
+
public DeltaCloudInstance refreshInstance(String instanceId) {
DeltaCloudInstance retVal = null;
try {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-12 20:13:25 UTC (rev 24122)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-12 20:19:00 UTC (rev 24123)
@@ -25,6 +25,7 @@
import org.apache.http.HttpResponse;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
@@ -51,7 +52,7 @@
}
}
- private static enum RequestType { POST, GET };
+ private static enum RequestType { POST, GET, DELETE };
private URL baseUrl;
@@ -86,6 +87,10 @@
{
request = new HttpPost(requestUrl);
}
+ else if (requestType == RequestType.DELETE)
+ {
+ request = new HttpDelete(requestUrl);
+ }
else
{
request = new HttpGet(requestUrl);
@@ -229,10 +234,11 @@
{
sendRequest(DCNS.INSTANCES + "/" + instanceId + DCNS.START, RequestType.GET);
}
-
+
+ @Override
public void destroyInstance(String instanceId) throws DeltaCloudClientException
{
- sendRequest(DCNS.INSTANCES + "/" + instanceId + DCNS.DESTROY, RequestType.GET);
+ sendRequest(DCNS.INSTANCES + "/" + instanceId, RequestType.DELETE);
}
private void checkForErrors(Document d) throws DeltaCloudClientException
15 years, 8 months
JBoss Tools SVN: r24122 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-12 16:13:25 -0400 (Thu, 12 Aug 2010)
New Revision: 24122
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (changeEvent): Don't
mark as override.
(listChanged): Ditto.
(PerformDestroyInstanceActionThread.PerformDestroyInstanceActionThread):
(PerformDestroyInstanceActionThread): New class to perform the destroy action in a
thread.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-12 20:01:17 UTC (rev 24121)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-12 20:13:25 UTC (rev 24122)
@@ -1,3 +1,12 @@
+2010-08-12 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (changeEvent): Don't
+ mark as override.
+ (listChanged): Ditto.
+ (PerformDestroyInstanceActionThread.PerformDestroyInstanceActionThread):
+ (PerformDestroyInstanceActionThread): New class to perform the destroy action in a
+ thread.
+
2010-08-11 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: Add new messages.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-12 20:01:17 UTC (rev 24121)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-12 20:13:25 UTC (rev 24122)
@@ -277,6 +277,27 @@
}
}
+ private class PerformDestroyInstanceActionThread extends Thread {
+ private DeltaCloud cloud;
+ private DeltaCloudInstance instance;
+
+ public PerformDestroyInstanceActionThread(DeltaCloud cloud, DeltaCloudInstance instance) {
+ super();
+ this.cloud = cloud;
+ this.instance = instance;
+ }
+
+ @Override
+ public void run() {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ cloud.destroyInstance(instance.getId());
+ }
+ });
+ }
+ }
+
private void makeActions() {
doubleClickAction = new Action() {
public void run() {
@@ -322,7 +343,7 @@
public void run() {
ISelection selection = viewer.getSelection();
DeltaCloudInstance instance = (DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(currCloud, instance, DeltaCloudInstance.DESTROY);
+ PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(currCloud, instance);
t.start();
}
};
@@ -362,7 +383,6 @@
message);
}
-
@Override
public void setFocus() {
// TODO Auto-generated method stub
@@ -380,7 +400,6 @@
currCloud = clouds[0];
}
- @Override
public void changeEvent(int type) {
String currName = currCloud.getName();
clouds = DeltaCloudManager.getDefault().getClouds();
@@ -397,7 +416,6 @@
cloudSelector.addModifyListener(cloudModifyListener);
}
- @Override
public void listChanged(DeltaCloudInstance[] list) {
currCloud.removeInstanceListListener(parentView);
viewer.setInput(list);
15 years, 8 months
JBoss Tools SVN: r24121 - in trunk/tests/features: org.jboss.tools.test.sdk.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-12 16:01:17 -0400 (Thu, 12 Aug 2010)
New Revision: 24121
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
Log:
reverting changes related to https://jira.jboss.org/browse/JBIDE-6300
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2010-08-12 19:07:07 UTC (rev 24120)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2010-08-12 20:01:17 UTC (rev 24121)
@@ -34,4 +34,16 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.ui.bot.ext"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.ui.bot.ext.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
Modified: trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-08-12 19:07:07 UTC (rev 24120)
+++ trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-08-12 20:01:17 UTC (rev 24121)
@@ -294,6 +294,20 @@
unpack="false"/>
<plugin
+ id="org.jboss.tools.ui.bot.ext"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.jboss.tools.ui.bot.ext.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.jboss.tools.struts.ui.bot.test"
download-size="0"
install-size="0"
15 years, 8 months
JBoss Tools SVN: r24119 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-12 14:21:04 -0400 (Thu, 12 Aug 2010)
New Revision: 24119
Modified:
trunk/build/publish.sh
Log:
move component zips from inside ${WORKSPACE}/sources/aggregate/site/zips to ${STAGINGDIR}/components for publication to dl.jb.org
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-08-12 18:03:14 UTC (rev 24118)
+++ trunk/build/publish.sh 2010-08-12 18:21:04 UTC (rev 24119)
@@ -90,6 +90,15 @@
done
fi
+# collect component zips from upstream aggregated build jobs
+if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
+ mkdir -p ${STAGINGDIR}/components
+ for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Update*.zip") $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Sources*.zip"); do
+ mv $z ${STAGINGDIR}/components
+ done
+fi
+
+# generate list of zips in this job
METAFILE=zip.list.txt
echo "ALL_ZIPS = \\" >> ${STAGINGDIR}/logs/${METAFILE}
for z in $(find ${STAGINGDIR} -name "*Update*.zip") $(find ${STAGINGDIR} -name "*Sources*.zip"); do
15 years, 8 months
JBoss Tools SVN: r24118 - trunk/common/features/org.jboss.tools.ui.bot.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-12 14:03:14 -0400 (Thu, 12 Aug 2010)
New Revision: 24118
Modified:
trunk/common/features/org.jboss.tools.ui.bot.feature/feature.xml
Log:
JBIDE-6300 feature should contain plugins, not included features. d'oh
Modified: trunk/common/features/org.jboss.tools.ui.bot.feature/feature.xml
===================================================================
--- trunk/common/features/org.jboss.tools.ui.bot.feature/feature.xml 2010-08-12 17:39:29 UTC (rev 24117)
+++ trunk/common/features/org.jboss.tools.ui.bot.feature/feature.xml 2010-08-12 18:03:14 UTC (rev 24118)
@@ -27,12 +27,7 @@
<update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable/galileo/"/>
</url> -->
- <includes
- id="org.jboss.tools.ui.bot.ext"
- version="0.0.0"/>
+ <plugin id="org.jboss.tools.ui.bot.ext" download-size="0" install-size="0" version="0.0.0"/>
+ <plugin id="org.jboss.tools.ui.bot.ext.test" download-size="0" install-size="0" version="0.0.0"/>
- <includes
- id="org.jboss.tools.ui.bot.ext.test"
- version="0.0.0"/>
-
</feature>
15 years, 8 months
JBoss Tools SVN: r24117 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-08-12 13:39:29 -0400 (Thu, 12 Aug 2010)
New Revision: 24117
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
Log:
https://jira.jboss.org/browse/JBIDE-6773 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2010-08-12 17:04:41 UTC (rev 24116)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2010-08-12 17:39:29 UTC (rev 24117)
@@ -73,6 +73,7 @@
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.actions.AddConfigurationAction;
import org.hibernate.eclipse.console.utils.LaunchHelper;
+import org.hibernate.eclipse.launch.ConsoleConfigurationJavaClasspathTab;
import org.hibernate.eclipse.launch.ConsoleConfigurationMainTab;
import org.hibernate.eclipse.launch.ConsoleConfigurationTabGroup;
import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
@@ -568,16 +569,22 @@
setPathAttribute(currentLaunchConfig, IConsoleConfigurationLaunchConstants.CFG_XML_FILE, configFullPath);
setStrAttribute(currentLaunchConfig, IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, ConfigurationMode.CORE.toString());
ConsoleConfigurationMainTab ccmt = null;
+ ConsoleConfigurationJavaClasspathTab classpathTab = null;
ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
for (int i = 0; i < tabs.length; i++) {
if (tabs[i] instanceof ConsoleConfigurationMainTab) {
ccmt = (ConsoleConfigurationMainTab)tabs[i];
- break;
}
+ if (tabs[i] instanceof ConsoleConfigurationJavaClasspathTab) {
+ classpathTab = (ConsoleConfigurationJavaClasspathTab)tabs[i];
+ }
}
if (ccmt != null) {
ccmt.markConfigurationFileWillBeCreated();
}
+ if (classpathTab != null) {
+ classpathTab.markConfigurationFileWillBeCreated();
+ }
}
performInit();
dialogChanged();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-08-12 17:04:41 UTC (rev 24116)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-08-12 17:39:29 UTC (rev 24117)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.osgi.util.NLS;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.HibernateConsoleRuntimeException;
import org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -27,6 +28,8 @@
*/
public class ConsoleConfigurationJavaClasspathTab extends JavaClasspathTab {
+ protected boolean configurationFileWillBeCreated = false;
+
public boolean isShowBootpath() {
return false;
}
@@ -61,13 +64,25 @@
setErrorMessage(HibernateConsoleMessages.ConsoleConfigurationTabGroup_classpath_must_be_set_or_restored_to_default);
}
if (resUserClasses && resExistArchive) {
- try {
- ConsoleConfiguration ccTest = new ConsoleConfiguration(new EclipseLaunchConsoleConfigurationPreferences(launchConfig));
- ccTest.buildWith(null, false);
- } catch (Exception ex) {
- resUserClasses = false;
- setErrorMessage(ex.getMessage());
+ boolean flagTryToBuild = true;
+ ConsoleConfiguration ccTest = new ConsoleConfiguration(new EclipseLaunchConsoleConfigurationPreferences(launchConfig));
+ if (configurationFileWillBeCreated) {
+ // do not make a try to build console configuration in case of "configurationFileWillBeCreated" and
+ // exception to resolve the file
+ try {
+ ccTest.getConfigXMLFile();
+ } catch (HibernateConsoleRuntimeException ex) {
+ flagTryToBuild = false;
+ }
}
+ if (flagTryToBuild) {
+ try {
+ ccTest.buildWith(null, false);
+ } catch (Exception ex) {
+ resUserClasses = false;
+ setErrorMessage(ex.getMessage());
+ }
+ }
}
return resUserClasses && resExistArchive;
}
@@ -80,4 +95,8 @@
public boolean canSave() {
return super.canSave();
}
+
+ public void markConfigurationFileWillBeCreated() {
+ configurationFileWillBeCreated = true;
+ }
}
15 years, 8 months
JBoss Tools SVN: r24116 - trunk/common/plugins/org.jboss.tools.common.model.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-12 13:04:41 -0400 (Thu, 12 Aug 2010)
New Revision: 24116
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties
Log:
https://jira.jboss.org/browse/JBIDE-6430 Eclipse has a problem to reference org.jboss.tools.common.model.ui 3.1.1
for some reason org.jboss.tools.common.model.ui_3.2.0.v201008101247N-M2 added to bundle class path updated build.properties to se if it fixes that problem
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties 2010-08-12 16:53:21 UTC (rev 24115)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/build.properties 2010-08-12 17:04:41 UTC (rev 24116)
@@ -1,9 +1,11 @@
-source.. = src/,\
- resources/
bin.includes = plugin.xml,\
- .,\
plugin.*,\
about.html,\
META-INF/,\
images/,\
- templates/
+ templates/,\
+ .
+jars.compile.order = .
+output.. = bin/
+source.. = src/,\
+ resources/
15 years, 8 months