JBoss Tools SVN: r4644 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-11-01 14:39:44 -0400 (Thu, 01 Nov 2007)
New Revision: 4644
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
Log:
JBIDE-1229 - added server's status to view, corrected column labels.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-11-01 17:51:22 UTC (rev 4643)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-11-01 18:39:44 UTC (rev 4644)
@@ -89,7 +89,7 @@
this.viewSite = view.getViewSite();
- int cols[] = new int[] {150, 75};
+ int cols[] = new int[] {150, 50, 50};
treeTable = new Tree(this, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.NONE);
treeTable.setHeaderVisible(true);
@@ -103,9 +103,13 @@
column.setWidth(cols[0]);
TreeColumn column2 = new TreeColumn(treeTable, SWT.SINGLE);
- column2.setText(Messages.viewStatus);
+ column2.setText(Messages.viewState);
column2.setWidth(cols[1]);
+ TreeColumn column3 = new TreeColumn(treeTable, SWT.SINGLE);
+ column3.setText(Messages.viewStatus);
+ column3.setWidth(cols[2]);
+
tableViewer = new ServerTableViewer(viewSite, treeTable);
initializeActions(tableViewer);
17 years, 2 months
JBoss Tools SVN: r4643 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2007-11-01 13:51:22 -0400 (Thu, 01 Nov 2007)
New Revision: 4643
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
code revert
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-11-01 17:48:28 UTC (rev 4642)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-11-01 17:51:22 UTC (rev 4643)
@@ -241,26 +241,6 @@
return false;
}
- private boolean reCreateNode(nsIDOMNode visualOldNode, Node sourceNode, nsIDOMNode visualContainer) {
- nsIDOMNode visualNewNode = createNode(sourceNode, visualContainer);
- try {
- if (visualNewNode != null) {
- nsIDOMHTMLInputElement iDOMInputElement = (nsIDOMHTMLInputElement) visualNewNode.queryInterface(nsIDOMHTMLInputElement.NS_IDOMHTMLINPUTELEMENT_IID);
- iDOMInputElement.setReadOnly(true);
- }
- } catch(XPCOMException ex) {
- //just ignore this exception
- }
- if (visualNewNode != null) {
- visualContainer.replaceChild(visualOldNode, visualNewNode);
- return true;
- }
- else {
- visualContainer.removeChild(visualOldNode);
- }
- return false;
- }
-
private nsIDOMElement createBorder(Node sourceNode,
nsIDOMElement visualNode, boolean block) {
nsIDOMElement border = null;
@@ -819,7 +799,8 @@
nsIDOMNode visualContainer = visualOldNode.getParentNode();
nsIDOMNode visualNextNode = visualOldNode.getNextSibling();
if (visualContainer != null) {
- reCreateNode(visualOldNode, sourceNode, visualContainer);
+ visualContainer.removeChild(visualOldNode);
+ addNode(sourceNode, visualNextNode, visualContainer);
}
} else {
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
@@ -2022,9 +2003,7 @@
protected nsIDOMNode createTextNode(Node sourceNode, boolean registerFlag ) {
String sourceText = sourceNode.getNodeValue();
if (sourceText.trim().length() <= 0) {
- if (registerFlag) {
- registerNodes(new VpeNodeMapping(sourceNode, null));
- }
+ registerNodes(new VpeNodeMapping(sourceNode, null));
return null;
}
17 years, 2 months
JBoss Tools SVN: r4642 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-01 13:48:28 -0400 (Thu, 01 Nov 2007)
New Revision: 4642
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1239 Done
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-11-01 17:47:56 UTC (rev 4641)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-11-01 17:48:28 UTC (rev 4642)
@@ -67,7 +67,8 @@
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType =
launchManager.getLaunchConfigurationType("org.hibernate.eclipse.launch.CodeGenerationLaunchConfigurationType"); //$NON-NLS-1$
- // we put null in location to avoid it being inside the project by default since the launch config currenlty will be machine independent with respect to the paths.
+ // we put null in location to avoid it being inside the project by default since the launch config currenlty will be machine independent with respect to the paths.
+ launchConfigurationType.getAttribute("");
ILaunchConfigurationWorkingCopy wc =
launchConfigurationType.newInstance(null, project.getName() + "-generate-entities"); //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2007-11-01 17:47:56 UTC (rev 4641)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2007-11-01 17:48:28 UTC (rev 4642)
@@ -16,14 +16,21 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
+import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
@@ -70,13 +77,14 @@
projectEditor.doFillIntoGrid(projectComposite);
- configEditor = SeamWizardFactory.createHibernateConsoleConfigurationSelectionFieldEditor(null);
+ configEditor = SeamWizardFactory.createHibernateConsoleConfigurationSelectionFieldEditor(getConsoleConfigurationName(projectName));
configEditor.addPropertyChangeListener(this);
configEditor.doFillIntoGrid(projectComposite);
configEditor.setEditable(false);
+ configEditor.addPropertyChangeListener(this);
String config = (String)configEditor.getValue();
- if(config==null && config.length()==0) {
+ if(config==null || config.length()==0) {
setMessage(SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_HIBERNATE_CONFIGURATION_MESSAGE);
setPageComplete(false);
}
@@ -100,6 +108,33 @@
setControl(top);
}
+ private static String getConsoleConfigurationName(String seamWebProjectName) {
+ if(seamWebProjectName==null || seamWebProjectName.trim().length()==0) {
+ return null;
+ }
+ String seamProjectName = seamWebProjectName;
+ IProject webProject = ResourcesPlugin.getWorkspace().getRoot().getProject(seamWebProjectName);
+ if(webProject==null) {
+ return null;
+ }
+ SeamProjectsSet projectSet = SeamProjectsSet.create(webProject);
+ if(!projectSet.isWarConfiguration()) {
+ IProject ejbProject = projectSet.getEjbProject();
+ if(ejbProject==null) {
+ return null;
+ }
+ seamProjectName = ejbProject.getName();
+ }
+ ConsoleConfiguration[] configs = KnownConfigurations.getInstance().getConfigurations();
+ for (int i = 0; i < configs.length; i++) {
+ IJavaProject javaProject = ProjectUtils.findJavaProject(configs[i]);
+ if(javaProject!=null && javaProject.getProject().getName().equals(seamProjectName)) {
+ return configs[i].getName();
+ }
+ }
+ return null;
+ }
+
public static class GridLayoutComposite extends Composite {
public GridLayoutComposite(Composite parent, int style, int columnNumber) {
@@ -118,6 +153,18 @@
* @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
+ if(IParameter.SEAM_PROJECT_NAME.equals(event.getPropertyName()) &&
+ event.getNewValue()!=null &&
+ !event.getNewValue().equals(event.getOldValue())) {
+ String consoleConfigName = getConsoleConfigurationName(event.getNewValue().toString());
+ if(consoleConfigName!=null) {
+ configEditor.setValue(consoleConfigName);
+ }
+ }
+ validate();
+ }
+
+ private void validate() {
Map<String, String> errors = ValidatorFactory.SEAM_PROJECT_NAME_VALIDATOR.validate(projectEditor.getValue(), null);
if(errors.size()>0) {
@@ -126,7 +173,7 @@
return;
}
String config = (String)configEditor.getValue();
- if(config==null && config.length()==0) {
+ if(config==null || config.length()==0) {
setErrorMessage(SeamUIMessages.GENERATE_SEAM_ENTITIES_WIZARD_HIBERNATE_CONFIGURATION_ERROR);
setPageComplete(false);
return;
@@ -148,5 +195,4 @@
}
return null;
}
-
-}
+}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r4641 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-01 13:47:56 -0400 (Thu, 01 Nov 2007)
New Revision: 4641
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1239 Moved Util method form jboss tools to hibernate tools
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java 2007-11-01 17:47:28 UTC (rev 4640)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java 2007-11-01 17:47:56 UTC (rev 4641)
@@ -19,7 +19,7 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.ObjectPluginAction;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.eclipse.console.views.KnownConfigurationsView;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
public class OpenDiagramActionDelegate extends OpenActionDelegate {
@@ -31,7 +31,7 @@
ObjectEditorInput input = (ObjectEditorInput)hashMap.get(rootClass);
ConsoleConfiguration consoleConfiguration = (ConsoleConfiguration)(((TreeSelection)objectPluginAction.getSelection()).getPaths()[0]).getSegment(0);
- IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
+ IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
if(input == null) {
input = new ObjectEditorInput(consoleConfiguration, rootClass, proj);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-11-01 17:47:28 UTC (rev 4640)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenFileActionUtils.java 2007-11-01 17:47:56 UTC (rev 4641)
@@ -5,35 +5,23 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
-import org.dom4j.Node;
-import org.dom4j.Visitor;
import org.dom4j.VisitorSupport;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.eclipse.console.utils.ProjectUtils;
-import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
-import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
@@ -49,27 +37,6 @@
IDE.openEditor(page, (IFile) resource);
}
- public static IJavaProject findJavaProject(ConsoleConfiguration consoleConfiguration) {
- IJavaProject proj = null;
- if (consoleConfiguration != null) {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( "org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType" );
- ILaunchConfiguration[] launchConfigurations;
- try {
- launchConfigurations = launchManager.getLaunchConfigurations( launchConfigurationType );
- for (int i = 0; i < launchConfigurations.length; i++) { // can't believe there is no look up by name API
- ILaunchConfiguration launchConfiguration = launchConfigurations[i];
- if(launchConfiguration.getName().equals(consoleConfiguration.getName())) {
- proj = ProjectUtils.findJavaProject(launchConfiguration.getAttribute(IConsoleConfigurationLaunchConstants.PROJECT_NAME, ""));
- }
- }
- } catch (CoreException e1) {
- ViewPlugin.getDefault().logError("Can't find java project.", e1);
- }
- }
- return proj;
- }
-
public static boolean rootClassHasAnnotations(ConsoleConfiguration consoleConfiguration, java.io.File configXMLFile, RootClass rootClass) {
if (configXMLFile == null) return true;
Document doc = getDocument(consoleConfiguration, configXMLFile);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-11-01 17:47:28 UTC (rev 4640)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenMappingActionDelegate.java 2007-11-01 17:47:56 UTC (rev 4641)
@@ -10,51 +10,20 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.view.views;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.dom4j.Attribute;
import org.dom4j.Document;
-import org.dom4j.DocumentException;
-import org.dom4j.Element;
-import org.eclipse.core.internal.resources.File;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.ObjectPluginAction;
-import org.hibernate.HibernateException;
-import org.hibernate.MappingException;
-import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.utils.ProjectUtils;
-import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.hibernate.mapping.RootClass;
import org.hibernate.util.XMLHelper;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
-import org.xml.sax.InputSource;
public class OpenMappingActionDelegate extends OpenActionDelegate {
private static XMLHelper helper = new XMLHelper();
@@ -63,7 +32,7 @@
ObjectPluginAction objectPluginAction = (ObjectPluginAction)action;
RootClass rootClass = (RootClass)((TreeSelection)objectPluginAction.getSelection()).getFirstElement();
ConsoleConfiguration consoleConfiguration = (ConsoleConfiguration)(((TreeSelection)objectPluginAction.getSelection()).getPaths()[0]).getSegment(0);
- IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
+ IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
Document doc = OpenFileActionUtils.getDocument(consoleConfiguration, configXMLFile);
// IResource resource = OpenFileActionUtils.getResource(consoleConfiguration, proj, doc, configXMLFile, rootClass);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-11-01 17:47:28 UTC (rev 4640)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenSourceActionDelegate.java 2007-11-01 17:47:56 UTC (rev 4641)
@@ -21,6 +21,7 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.internal.ObjectPluginAction;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.mapping.RootClass;
import org.jboss.tools.hibernate.ui.view.ViewPlugin;
@@ -30,7 +31,7 @@
ObjectPluginAction objectPluginAction = (ObjectPluginAction)action;
RootClass rootClass = (RootClass)((TreeSelection)objectPluginAction.getSelection()).getFirstElement();
ConsoleConfiguration consoleConfiguration = (ConsoleConfiguration)(((TreeSelection)objectPluginAction.getSelection()).getPaths()[0]).getSegment(0);
- IJavaProject proj = OpenFileActionUtils.findJavaProject(consoleConfiguration);
+ IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
IResource resource = null;
String fullyQualifiedName = HibernateUtils.getPersistentClassName(rootClass);
17 years, 2 months
JBoss Tools SVN: r4640 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-11-01 13:47:28 -0400 (Thu, 01 Nov 2007)
New Revision: 4640
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1239 Moved Util method form jboss tools to hibernate tools
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2007-11-01 17:37:17 UTC (rev 4639)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2007-11-01 17:47:28 UTC (rev 4640)
@@ -32,12 +32,18 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
+import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.hibernate.util.StringHelper;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
@@ -163,5 +169,25 @@
return null;
}
}
-
-}
+
+ public static IJavaProject findJavaProject(ConsoleConfiguration consoleConfiguration) {
+ IJavaProject proj = null;
+ if (consoleConfiguration != null) {
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( "org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType" );
+ ILaunchConfiguration[] launchConfigurations;
+ try {
+ launchConfigurations = launchManager.getLaunchConfigurations( launchConfigurationType );
+ for (int i = 0; i < launchConfigurations.length; i++) { // can't believe there is no look up by name API
+ ILaunchConfiguration launchConfiguration = launchConfigurations[i];
+ if(launchConfiguration.getName().equals(consoleConfiguration.getName())) {
+ proj = ProjectUtils.findJavaProject(launchConfiguration.getAttribute(IConsoleConfigurationLaunchConstants.PROJECT_NAME, ""));
+ }
+ }
+ } catch (CoreException e1) {
+ HibernateConsolePlugin.getDefault().log(e1);
+ }
+ }
+ return proj;
+ }
+}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r4639 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-11-01 13:37:17 -0400 (Thu, 01 Nov 2007)
New Revision: 4639
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/RadioField.java
Log:
JBIDE-1220
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-11-01 17:30:07 UTC (rev 4638)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -97,10 +97,12 @@
true, new NewSeamRuntimeAction(), (IValidator)null);
private IFieldEditor jBossAsDeployAsEditor = IFieldEditorFactory.INSTANCE
- .createComboEditor(
+ .createRadioEditor(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
- SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DEPLOY_AS, Arrays.asList(new String[] { SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_WAR, SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_EAR }),
- getDeployAsDefaultValue(), false);
+ SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DEPLOY_AS,
+ Arrays.asList(new String[] { SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_WAR, SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_EAR }),
+ Arrays.asList(new Object[] { SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_WAR, SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_EAR }),
+ getDeployAsDefaultValue());
String lastCreatedCPName = ""; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-11-01 17:30:07 UTC (rev 4638)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -52,6 +52,18 @@
*/
ITaggedFieldEditor createComboEditor(String name, String label,
List values, Object defaultValue, boolean flat);
+
+ /**
+ *
+ * @param name
+ * @param label
+ * @param labels
+ * @param values
+ * @param defaultValue
+ * @return
+ */
+ public ITaggedFieldEditor createRadioEditor(String name, String label,
+ List<String> labels, List values, Object defaultValue);
/**
*
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/RadioFieldEditor.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -0,0 +1,108 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.widget.editor;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.jboss.tools.seam.ui.widget.field.RadioField;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ */
+public class RadioFieldEditor extends BaseFieldEditor implements ITaggedFieldEditor,PropertyChangeListener{
+ List values = null;
+ List<String> labels;
+
+ RadioField radioField;
+
+ public RadioFieldEditor(String name, String label, List<String> labels, List values,Object defaultValue) {
+ super(name, label, defaultValue);
+ this.labels = labels;
+ this.values = Collections.unmodifiableList(values);
+ }
+
+ @Override
+ public Object[] getEditorControls(Object composite) {
+ return new Control[] {getComboControl((Composite)composite)};
+ }
+
+ @Override
+ public void doFillIntoGrid(Object parent) {
+ }
+
+ public Control getComboControl(Composite composite) {
+ if(radioField == null) {
+ radioField = new RadioField(composite,labels, values,getValue());
+ radioField.addPropertyChangeListener(this);
+ } else if(composite!=null) {
+ Assert.isTrue(radioField.getControl().getParent()==composite);
+ }
+ return radioField.getControl();
+ }
+
+ @Override
+ public Object[] getEditorControls() {
+ return null;
+ }
+
+ public void save(Object object) {
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ setValue(evt.getNewValue());
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
+ */
+ public String[] getTags() {
+ String[] result = new String[values.size()];
+ for (int i = 0; i < result.length; i++) result[i] = values.get(0).toString();
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
+ */
+ public void setTags(String[] tags) {
+ values.clear();
+ for (int i = 0; i < tags.length; i++) values.add(tags[i]);
+ //TODO
+// radioField.setTags(tags,getValueAsString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.BaseFieldEditor#getNumberOfControls()
+ */
+ @Override
+ public int getNumberOfControls() {
+ return 1;
+ }
+
+ public void setValue(Object newValue) {
+ if(newValue==null) {
+ return;
+ }
+ super.setValue(newValue);
+ if(radioField!=null) {
+ radioField.removePropertyChangeListener(this);
+ radioField.setValue(newValue.toString());
+ radioField.addPropertyChangeListener(this);
+ }
+ }
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-11-01 17:30:07 UTC (rev 4638)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -58,6 +58,12 @@
return editor;
}
+ public ITaggedFieldEditor createRadioEditor(String name, String label,
+ List<String> labels, List values, Object defaultValue) {
+ TaggedRadioFieldEditor editor = new TaggedRadioFieldEditor(name,label, labels, values, defaultValue);
+ return editor;
+ }
+
/**
*
*/
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedRadioFieldEditor.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -0,0 +1,68 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.widget.editor;
+
+import java.beans.PropertyChangeListener;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ */
+public class TaggedRadioFieldEditor extends CompositeEditor implements ITaggedFieldEditor, PropertyChangeListener{
+
+ List values = null;
+ RadioFieldEditor radios = null;
+
+ public TaggedRadioFieldEditor(String name, String label, List<String> labels, List values,
+ Object defaultValue) {
+
+ super(name, label, defaultValue==null?"":defaultValue.toString()); //$NON-NLS-1$
+ this.values = Collections.unmodifiableList(values);
+ radios = new RadioFieldEditor(
+ name,label,labels, values,getValue());
+ addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label),
+ radios});
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#getTags()
+ */
+ public String[] getTags() {
+ return radios.getTags();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor#setTags(java.lang.String[])
+ */
+ public void setTags(String[] tags) {
+ radios.setTags(tags);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#setEditable(boolean)
+ */
+ @Override
+ public void setEditable(boolean ediatble) {
+ radios.setEditable(ediatble);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.widget.editor.CompositeEditor#isEditable()
+ */
+ @Override
+ public boolean isEditable() {
+ return radios.isEditable();
+ }
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/RadioField.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/RadioField.java 2007-11-01 17:30:07 UTC (rev 4638)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/RadioField.java 2007-11-01 17:37:17 UTC (rev 4639)
@@ -44,9 +44,10 @@
radios[i] = new Button(topComposite, SWT.RADIO);
radios[i].setText(labels.get(i));
radios[i].addSelectionListener(this);
+ radios[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Object value = values.get(i);
radios[i].setData(value);
- if(value==defaultValue) {
+ if(value != null && value.equals(defaultValue)) {
radios[i].setSelection(true);
this.value = value;
}
@@ -81,4 +82,16 @@
public Object getValue() {
return value;
}
-}
\ No newline at end of file
+
+ public void setValue(String value) {
+ this.value = value;
+ for (int i = 0; i < radios.length; i++) {
+ if(value.equals(radios[i].getData())) {
+ radios[i].setSelection(true);
+ } else {
+ radios[i].setSelection(false);
+ }
+ }
+ }
+
+}
17 years, 2 months
JBoss Tools SVN: r4638 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-11-01 13:30:07 -0400 (Thu, 01 Nov 2007)
New Revision: 4638
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
Log:
UI error in event log - status object was shown as tostring
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-11-01 16:58:29 UTC (rev 4637)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-11-01 17:30:07 UTC (rev 4638)
@@ -78,7 +78,7 @@
IModule module2 = module[0];
// if it's being removed
if( deltaKind == ServerBehaviourDelegate.REMOVED ) {
- removeModule(module2, kind, deltaKind, monitor);
+ removeModule(module2, kind, deltaKind, modulePublishState, monitor);
return null;
}
@@ -92,10 +92,11 @@
return null;
}
- protected void removeModule(IModule module, int kind, int deltaKind, IProgressMonitor monitor) {
+ protected void removeModule(IModule module, int kind, int deltaKind, int publishState, IProgressMonitor monitor) {
IArchive pack = getPackage(module);
// remove all of the deployed items
- PublishEvent event = PublisherEventLogger.createModuleRootEvent(eventRoot, new IModule[]{module}, kind, deltaKind);
+ PublishEvent event = PublisherEventLogger.createModuleRootEvent(
+ eventRoot, new IModule[]{module}, kind, deltaKind, publishState);
if( pack != null ) {
IPath sourcePath = pack.getArchiveFilePath();
IPath destPath = new Path(server.getDeployDirectory()).append(sourcePath.lastSegment());
@@ -108,7 +109,8 @@
protected void publishModule(IModule module, int kind, int deltaKind, int modulePublishState, IProgressMonitor monitor) {
- PublishEvent event = PublisherEventLogger.createModuleRootEvent(eventRoot, new IModule[]{module}, kind, deltaKind);
+ PublishEvent event = PublisherEventLogger.createModuleRootEvent(
+ eventRoot, new IModule[]{module}, kind, deltaKind, modulePublishState);
IArchive pack = getPackage(module);
IPath sourcePath = pack.getArchiveFilePath();
IPath destPathRoot = new Path(server.getDeployDirectory());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java 2007-11-01 16:58:29 UTC (rev 4637)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java 2007-11-01 17:30:07 UTC (rev 4638)
@@ -34,7 +34,9 @@
// properties
public static final String MODULE_KIND = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MODULE_KIND";
public static final String DELTA_KIND = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.DELTA_KIND";
- public static PublishEvent createModuleRootEvent(EventLogTreeItem parent, IModule[] module, int kind, int deltaKind) {
+ public static final String MODULE_PUBLISH_STATE = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MODULE_PUBLISH_STATE";
+ public static PublishEvent createModuleRootEvent(EventLogTreeItem parent, IModule[] module,
+ int kind, int deltaKind, int moduleStateKind) {
PublishEvent event = new PublishEvent(parent, MODULE_ROOT_EVENT);
String name = "";
for( int i = 0; i < module.length; i++ ) {
@@ -43,6 +45,7 @@
name = name.substring(0, name.length()-1);
event.setProperty(MODULE_KIND, new Integer(kind));
event.setProperty(DELTA_KIND, new Integer(deltaKind));
+ event.setProperty(MODULE_PUBLISH_STATE, new Integer(moduleStateKind));
event.setProperty(MODULE_NAME, name);
EventLogModel.markChanged(parent);
return event;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-11-01 16:58:29 UTC (rev 4637)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-11-01 17:30:07 UTC (rev 4638)
@@ -126,8 +126,8 @@
// delta = [no_change, added, changed, removed] = [0,1,2,3]
if( module.length == 0 ) return;
IJBossServerPublisher publisher;
- int modulePublishState = getServer().getModulePublishState(module) + 0;
- PublishEvent root = PublisherEventLogger.createModuleRootEvent(publishEvent, module, kind, deltaKind);
+ int modulePublishState = getServer().getModulePublishState(module);
+ PublishEvent root = PublisherEventLogger.createModuleRootEvent(publishEvent, module, kind, deltaKind, modulePublishState);
if( module.length > 0 ) {
IModule lastMod = module[module.length -1];
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-11-01 16:58:29 UTC (rev 4637)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-11-01 17:30:07 UTC (rev 4638)
@@ -56,14 +56,20 @@
propertyToMessageMap.put(PublisherEventLogger.EXCEPTION_MESSAGE, "Exception");
propertyToMessageMap.put(PublisherEventLogger.SUCCESS_PROPERTY, "Action Succeeded");
propertyToMessageMap.put(PublisherEventLogger.MODULE_NAME, "Module Name");
- propertyToMessageMap.put(PublisherEventLogger.DELTA_KIND, "Change Type");
- propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND, "Publish Type");
+ propertyToMessageMap.put(PublisherEventLogger.DELTA_KIND, "Module's Change Type");
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND, "Server's Publish Type");
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_PUBLISH_STATE, "Module's Publish Type");
propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND + DELIMITER + IServer.PUBLISH_AUTO, "Auto");
propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND + DELIMITER + IServer.PUBLISH_CLEAN, "Clean");
propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND + DELIMITER + IServer.PUBLISH_FULL, "Full");
propertyToMessageMap.put(PublisherEventLogger.MODULE_KIND + DELIMITER + IServer.PUBLISH_INCREMENTAL, "Incremental");
-
+
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_PUBLISH_STATE + DELIMITER + IServer.PUBLISH_STATE_FULL, "Full");
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_PUBLISH_STATE + DELIMITER + IServer.PUBLISH_STATE_INCREMENTAL, "Incremental");
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_PUBLISH_STATE + DELIMITER + IServer.PUBLISH_STATE_NONE, "None");
+ propertyToMessageMap.put(PublisherEventLogger.MODULE_PUBLISH_STATE + DELIMITER + IServer.PUBLISH_STATE_UNKNOWN, "Unknown");
+
propertyToMessageMap.put(PublisherEventLogger.DELTA_KIND + DELIMITER + ServerBehaviourDelegate.ADDED, "Added");
propertyToMessageMap.put(PublisherEventLogger.DELTA_KIND + DELIMITER + ServerBehaviourDelegate.CHANGED, "Changed");
propertyToMessageMap.put(PublisherEventLogger.DELTA_KIND + DELIMITER + ServerBehaviourDelegate.REMOVED, "Removed");
@@ -114,13 +120,18 @@
protected String getKindDeltaKind(EventLogTreeItem item) {
int kind = ((Integer)item.getProperty(PublisherEventLogger.MODULE_KIND)).intValue();
int deltaKind = ((Integer)item.getProperty(PublisherEventLogger.DELTA_KIND)).intValue();
-
+ int modPublishState = ((Integer)item.getProperty(PublisherEventLogger.MODULE_PUBLISH_STATE)).intValue();
String r = "[";
switch(kind) {
- case IServer.PUBLISH_AUTO: r += "Auto, "; break;
case IServer.PUBLISH_CLEAN: r += "Clean, "; break;
case IServer.PUBLISH_FULL: r += "Full, "; break;
- case IServer.PUBLISH_INCREMENTAL: r += "Incremental, "; break;
+ case IServer.PUBLISH_AUTO:
+ case IServer.PUBLISH_INCREMENTAL:
+ if( modPublishState == IServer.PUBLISH_STATE_FULL || modPublishState == IServer.PUBLISH_STATE_UNKNOWN)
+ r += "Full, ";
+ else
+ r += "Incremental, ";
+ break;
default: r += "Unknown, ";
}
switch( deltaKind ) {
17 years, 2 months
JBoss Tools SVN: r4637 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-11-01 12:58:29 -0400 (Thu, 01 Nov 2007)
New Revision: 4637
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
Log:
UI error in event log - status object was shown as tostring
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-11-01 16:43:55 UTC (rev 4636)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-11-01 16:58:29 UTC (rev 4637)
@@ -30,6 +30,7 @@
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger;
+import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublishUtilStatusWrapper;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
@@ -47,6 +48,7 @@
supported.add(PublisherEventLogger.FILE_COPPIED_EVENT);
supported.add(PublisherEventLogger.FILE_DELETED_EVENT);
supported.add(PublisherEventLogger.FOLDER_DELETED_EVENT);
+ supported.add(PublisherEventLogger.PUBLISH_UTIL_STATUS_WRAPPER_TYPE);
}
protected void loadPropertyMap() {
propertyToMessageMap.put(PublisherEventLogger.SOURCE_PROPERTY, "Source");
@@ -134,6 +136,13 @@
public String getText(EventLogTreeItem item) {
String type = item.getSpecificType();
+ if( type.equals(PublisherEventLogger.PUBLISH_UTIL_STATUS_WRAPPER_TYPE)) {
+ Object o = item.getData();
+ if( o == null || !(o instanceof IStatus ))
+ return "Unknown Status Event: " + o;
+ return ((IStatus)o).getMessage();
+ }
+
if( type.equals(PublisherEventLogger.ROOT_EVENT)) {
return "Publishing to server";
}
17 years, 2 months
JBoss Tools SVN: r4636 - trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-11-01 12:43:55 -0400 (Thu, 01 Nov 2007)
New Revision: 4636
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java
Log:
compile fix
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java 2007-11-01 16:08:56 UTC (rev 4635)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java 2007-11-01 16:43:55 UTC (rev 4636)
@@ -144,7 +144,7 @@
assertEquals(1,configurations.length);
assertEquals(listener.added.size(), 1);
- knownConfigurations.removeConfiguration(configuration);
+ knownConfigurations.removeConfiguration(configuration,false);
configurations = knownConfigurations.getConfigurations();
assertEquals(0,configurations.length);
17 years, 2 months
JBoss Tools SVN: r4635 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-11-01 12:08:56 -0400 (Thu, 01 Nov 2007)
New Revision: 4635
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1211
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-11-01 16:07:23 UTC (rev 4634)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-11-01 16:08:56 UTC (rev 4635)
@@ -406,7 +406,8 @@
//delete whitespaces
int endPos = 0;
- while(TextUtil.isWhitespace(((TextImpl)focusNode).getValueSource().toCharArray()[offset+endPos])){
+ char[] chars = ((TextImpl)focusNode).getValueSource().toCharArray();
+ while(chars.length > (offset+endPos) && TextUtil.isWhitespace(chars[offset+endPos])){
endPos++;
}
Point range = sourceEditor.getTextViewer().getSelectedRange();
17 years, 2 months