JBoss Tools SVN: r37352 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-15 08:50:06 -0500 (Thu, 15 Dec 2011)
New Revision: 37352
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
catching all exceptions that may occour, preventing them to propagate to eclipse job scheduler
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-12-15 13:23:28 UTC (rev 37351)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-12-15 13:50:06 UTC (rev 37352)
@@ -142,7 +142,7 @@
status = Status.OK_STATUS;
} catch (OpenShiftException e) {
this.user = null;
- } catch (IOException e) {
+ } catch (Exception e) {
this.user = null;
}
wizardModel.setUser(user);
14 years, 4 months
JBoss Tools SVN: r37351 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-12-15 08:23:28 -0500 (Thu, 15 Dec 2011)
New Revision: 37351
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl/DialogSelectionHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
Log:
https://issues.jboss.org/browse/JBIDE-10470
Make hibernate.cfg.xml file relative to project's classpath
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl/DialogSelectionHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl/DialogSelectionHelper.java 2011-12-15 12:48:53 UTC (rev 37350)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl/DialogSelectionHelper.java 2011-12-15 13:23:28 UTC (rev 37351)
@@ -14,7 +14,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2011-12-15 12:48:53 UTC (rev 37350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2011-12-15 13:23:28 UTC (rev 37351)
@@ -14,7 +14,15 @@
import java.util.Arrays;
import java.util.List;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -196,12 +204,41 @@
}
MessageDialog dialog = createSetupDialog(HibernateConsoleMessages.ConsoleConfigurationMainTab_setup_configuration_file, HibernateConsoleMessages.ConsoleConfigurationMainTab_do_you_want_to_create_new_cfgxml, defaultChoice);
int answer = dialog.open();
+ IPath cfgFile = null;
if(answer==0) { // create new
- handleConfigurationFileCreate();
+ cfgFile = handleConfigurationFileCreate();
} else if (answer==1) { // use existing
- handleConfigurationFileBrowse();
+ cfgFile = handleConfigurationFileBrowse();
}
+ if (cfgFile != null){
+ HibernatePropertiesComposite.this.cfgFile.setText( makeClassPathRelative(cfgFile).toString() );
+ }
}
+
+ protected IPath makeClassPathRelative(IPath cfgFile){
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource res = root.findMember(cfgFile);
+ if ( res != null && res.exists() && res.getType() == IResource.FILE) {
+ IProject project = res.getProject();
+ IJavaProject jProject = JavaCore.create(project);
+ if (jProject != null){
+ try {
+ IPackageFragmentRoot[] allPackageFragmentRoots = jProject.getAllPackageFragmentRoots();
+ for (IPackageFragmentRoot iPackageFragmentRoot : allPackageFragmentRoots) {
+ if (!iPackageFragmentRoot.isArchive()){
+ if (iPackageFragmentRoot.getResource().getFullPath().isPrefixOf(cfgFile)){
+ cfgFile = cfgFile.removeFirstSegments(iPackageFragmentRoot.getResource().getFullPath().segmentCount());
+ return cfgFile.makeAbsolute();
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ //ignore
+ }
+ }
+ }
+ return cfgFile;
+ }
private MessageDialog createSetupDialog(String title, String question, int defaultChoice){
return new MessageDialog(getShell(),
@@ -213,15 +250,16 @@
defaultChoice);
}
- private void handleConfigurationFileBrowse() {
+ private IPath handleConfigurationFileBrowse() {
IPath initialPath = getConfigurationFilePath();
IPath[] paths = DialogSelectionHelper.chooseFileEntries(getShell(), initialPath, new IPath[0], HibernateConsoleMessages.ConsoleConfigurationMainTab_select_hibernate_cfg_xml_file, HibernateConsoleMessages.ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_cfg_xml, new String[] {HibernateConsoleMessages.ConsoleConfigurationMainTab_cfg_xml}, false, false, true);
if(paths!=null && paths.length==1) {
- HibernatePropertiesComposite.this.cfgFile.setText( (paths[0]).toOSString() );
+ return paths[0];
}
+ return null;
}
- private void handleConfigurationFileCreate() {
+ private IPath handleConfigurationFileCreate() {
NewConfigurationWizard wizard = new NewConfigurationWizard();
wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY );
IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
@@ -237,9 +275,10 @@
WizardNewFileCreationPage createdFilePath = ((WizardNewFileCreationPage)wizard.getStartingPage());
if(createdFilePath!=null) {
// createNewFile() does not creates new file if it was created by wizard (OK was pressed)
- HibernatePropertiesComposite.this.cfgFile.setText(createdFilePath.createNewFile().getFullPath().toOSString());
+ return createdFilePath.createNewFile().getFullPath();
}
}
+ return null;
}
};
}
14 years, 4 months
JBoss Tools SVN: r37350 - in trunk/hibernatetools: plugins/org.jboss.tools.hibernate3_5 and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-12-15 07:48:53 -0500 (Thu, 15 Dec 2011)
New Revision: 37350
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/Hibernate3_5Plugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/Hibernate4_0Plugin.java
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java
Modified:
trunk/hibernatetools/features/org.hibernate.eclipse.feature/feature.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/pom.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/pom.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF
Log:
https://issues.jboss.org/browse/JBIDE-10487
Change Plugin id and rename Plugin class
Modified: trunk/hibernatetools/features/org.hibernate.eclipse.feature/feature.xml
===================================================================
--- trunk/hibernatetools/features/org.hibernate.eclipse.feature/feature.xml 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/features/org.hibernate.eclipse.feature/feature.xml 2011-12-15 12:48:53 UTC (rev 37350)
@@ -132,14 +132,14 @@
version="0.0.0"/>
<plugin
- id="org.jboss.tools.hibernateextension3_5"
+ id="org.jboss.tools.hibernate3_5"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.jboss.tools.hibernateextension4_0"
+ id="org.jboss.tools.hibernate4_0"
download-size="0"
install-size="0"
version="0.0.0"/>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-12-15 12:48:53 UTC (rev 37350)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: HibernateExtension3_5
-Bundle-SymbolicName: org.jboss.tools.hibernateextension3_5;singleton:=true
+Bundle-Name: Hibernate3_5
+Bundle-SymbolicName: org.jboss.tools.hibernate3_5;singleton:=true
Bundle-Version: 3.4.0.qualifier
-Bundle-Activator: org.jboss.tools.hibernate3_5.HibernateExtension3_5Plugin
+Bundle-Activator: org.jboss.tools.hibernate3_5.Hibernate3_5Plugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/pom.xml 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/pom.xml 2011-12-15 12:48:53 UTC (rev 37350)
@@ -7,7 +7,7 @@
<version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
- <artifactId>org.jboss.tools.hibernateextension3_5</artifactId>
+ <artifactId>org.jboss.tools.hibernate3_5</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/Hibernate3_5Plugin.java (from rev 37150, trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/Hibernate3_5Plugin.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/Hibernate3_5Plugin.java 2011-12-15 12:48:53 UTC (rev 37350)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate3_5;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ *
+ * @author Dmitry Geraskov
+ * The activator class controls the plug-in life cycle
+ */
+public class Hibernate3_5Plugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernate3_5"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Hibernate3_5Plugin plugin;
+
+ /**
+ * The constructor
+ */
+ public Hibernate3_5Plugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Hibernate3_5Plugin getDefault() {
+ return plugin;
+ }
+
+}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java 2011-12-15 12:48:53 UTC (rev 37350)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.hibernate3_5;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- *
- * @author Dmitry Geraskov
- * The activator class controls the plug-in life cycle
- */
-public class HibernateExtension3_5Plugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.hibernateextension3_5"; //$NON-NLS-1$
-
- // The shared instance
- private static HibernateExtension3_5Plugin plugin;
-
- /**
- * The constructor
- */
- public HibernateExtension3_5Plugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static HibernateExtension3_5Plugin getDefault() {
- return plugin;
- }
-
-}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF 2011-12-15 12:48:53 UTC (rev 37350)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: HibernateExtension4_0
-Bundle-SymbolicName: org.jboss.tools.hibernateextension4_0;singleton:=true
+Bundle-Name: Hibernate4_0
+Bundle-SymbolicName: org.jboss.tools.hibernate4_0;singleton:=true
Bundle-Version: 3.4.0.qualifier
-Bundle-Activator: org.jboss.tools.hibernate4_0.HibernateExtension4_0Plugin
+Bundle-Activator: org.jboss.tools.hibernate4_0.Hibernate4_0Plugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/pom.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/pom.xml 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/pom.xml 2011-12-15 12:48:53 UTC (rev 37350)
@@ -7,7 +7,7 @@
<version>3.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.hibernatetools.plugins</groupId>
- <artifactId>org.jboss.tools.hibernateextension4_0</artifactId>
+ <artifactId>org.jboss.tools.hibernate4_0</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/Hibernate4_0Plugin.java (from rev 37150, trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/Hibernate4_0Plugin.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/Hibernate4_0Plugin.java 2011-12-15 12:48:53 UTC (rev 37350)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate4_0;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Dmitry Geraskov
+ * The activator class controls the plug-in life cycle
+ */
+public class Hibernate4_0Plugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernate4_0"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Hibernate4_0Plugin plugin;
+
+ /**
+ * The constructor
+ */
+ public Hibernate4_0Plugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Hibernate4_0Plugin getDefault() {
+ return plugin;
+ }
+
+}
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java 2011-12-15 12:48:53 UTC (rev 37350)
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.hibernate4_0;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Dmitry Geraskov
- * The activator class controls the plug-in life cycle
- */
-public class HibernateExtension4_0Plugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.hibernateextension4_0"; //$NON-NLS-1$
-
- // The shared instance
- private static HibernateExtension4_0Plugin plugin;
-
- /**
- * The constructor
- */
- public HibernateExtension4_0Plugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static HibernateExtension4_0Plugin getDefault() {
- return plugin;
- }
-
-}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/META-INF/MANIFEST.MF 2011-12-15 12:48:53 UTC (rev 37350)
@@ -60,7 +60,7 @@
org.eclipse.datatools.connectivity,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.editors,
- org.jboss.tools.hibernateextension3_5;bundle-version="3.4.0"
+ org.jboss.tools.hibernate3_5;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.hibernate.eclipse.console.test.HibernateConsoleTestPlugin
Eclipse-RegisterBuddy: org.hibernate.eclipse
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF 2011-12-15 12:45:37 UTC (rev 37349)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF 2011-12-15 12:48:53 UTC (rev 37350)
@@ -18,7 +18,7 @@
org.jboss.tools.hibernate.jpt.core,
org.jboss.tools.tests;bundle-version="2.0.0",
org.hibernate.eclipse;bundle-version="3.3.0",
- org.jboss.tools.hibernateextension3_5;bundle-version="3.4.0"
+ org.jboss.tools.hibernate3_5;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.hibernate.jpt.core.test
Bundle-Activator: org.jboss.tools.hibernate.jpt.core.test.HibernateJPTuiTestPlugin
14 years, 4 months
JBoss Tools SVN: r37349 - in trunk/openshift/plugins: org.jboss.tools.openshift.express.client/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-15 07:45:37 -0500 (Thu, 15 Dec 2011)
New Revision: 37349
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.0.1-SNAPSHOT.jar
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIException.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationStrategy.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AddToExistingProjectStrategy.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProjectStrategy.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java
Log:
[JBIDE-10455] switched to new client library branch (https://github.com/bdecoste/openshift-java-client)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2011-12-15 12:45:37 UTC (rev 37349)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar" sourcepath="/home/adietish/jboss-workspaces/openshift-java-client_andre/org.jboss.tools.openshift.express.client"/>
+ <classpathentry exported="true" kind="lib" path="openshift-java-client-1.0.1-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Final.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/META-INF/MANIFEST.MF 2011-12-15 12:45:37 UTC (rev 37349)
@@ -7,15 +7,8 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
jboss-dmr-1.0.0.Final.jar,
- org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
-Export-Package: org.jboss.tools.openshift.express.client,
- org.jboss.tools.openshift.express.client.configuration,
- org.jboss.tools.openshift.express.client.utils,
- org.jboss.tools.openshift.express.internal.client;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.httpclient;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.request;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.request.marshalling;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.response;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.response.unmarshalling;x-friends:="org.jboss.tools.openshift.express.ui",
- org.jboss.tools.openshift.express.internal.client.utils;x-friends:="org.jboss.tools.openshift.express.ui"
+ openshift-java-client-1.0.1-SNAPSHOT.jar
+Export-Package: com.openshift.express.client,
+ com.openshift.express.client.configuration,
+ com.openshift.express.client.utils
Require-Bundle: com.jcraft.jsch;bundle-version="0.1.44"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.client/build.properties 2011-12-15 12:45:37 UTC (rev 37349)
@@ -3,4 +3,6 @@
bin.includes = META-INF/,\
.,\
jboss-dmr-1.0.0.Final.jar,\
- org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
+ openshift-java-client-1.0.1-SNAPSHOT.jar
+src.includes = openshift-java-client-1.0.1-SNAPSHOT.jar,\
+ jboss-dmr-1.0.0.Final.jar
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.0.1-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-1.0.1-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIException.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIException.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/OpenShiftUIException.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -10,8 +10,11 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
+import com.openshift.express.client.OpenShiftException;
+/**
+ * @author Andre Dietisheim
+ */
public class OpenShiftUIException extends OpenShiftException {
private static final long serialVersionUID = 1L;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -25,7 +25,6 @@
import org.eclipse.ui.views.IViewRegistry;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.IServerModule;
-import org.jboss.tools.openshift.express.internal.client.utils.Base64Encoder;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.console.TailServerLogWorker.JschToEclipseLogger;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
@@ -33,6 +32,7 @@
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
+import com.openshift.express.client.utils.Base64Encoder;
/**
* The action associated with the "Show In>Remote Console" menu item.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPage.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -48,12 +48,13 @@
import org.jboss.tools.common.ui.databinding.InvertingBooleanConverter;
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.ValidationStatusControlDecoration;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizard;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizardModel;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
* @author Rob Stryker
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/AdapterWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -12,11 +12,12 @@
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.ui.util.EGitUIUtils;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizardModel;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
* @author Rob Stryker
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationDetailsDialog.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -28,13 +28,14 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.ui.BrowserUtil;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IEmbeddableCartridge;
-import org.jboss.tools.openshift.express.client.utils.RFC822DateUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftImages;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.utils.RFC822DateUtils;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -12,13 +12,14 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftApplicationNotAvailableException;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftApplicationNotAvailableException;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -55,14 +55,15 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.common.ui.databinding.DataBindingUtils;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IDomain;
-import org.jboss.tools.openshift.express.client.NotFoundOpenShiftException;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizardModel;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IDomain;
+import com.openshift.express.client.NotFoundOpenShiftException;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -14,12 +14,13 @@
import java.util.List;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IDomain;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizardModel;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IDomain;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -16,17 +16,18 @@
import org.eclipse.core.runtime.Status;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.NotFoundOpenShiftException;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
-import org.jboss.tools.openshift.express.client.User;
-import org.jboss.tools.openshift.express.client.configuration.DefaultConfiguration;
-import org.jboss.tools.openshift.express.client.configuration.SystemConfiguration;
-import org.jboss.tools.openshift.express.client.configuration.SystemProperties;
-import org.jboss.tools.openshift.express.client.configuration.UserConfiguration;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportProjectWizardModel;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.NotFoundOpenShiftException;
+import com.openshift.express.client.OpenShiftException;
+import com.openshift.express.client.User;
+import com.openshift.express.client.configuration.DefaultConfiguration;
+import com.openshift.express.client.configuration.SystemConfiguration;
+import com.openshift.express.client.configuration.SystemProperties;
+import com.openshift.express.client.configuration.UserConfiguration;
+
/**
* @author André Dietisheim
*/
@@ -70,10 +71,11 @@
protected String getUserConfiguration() {
String configuredUsername = null;
try {
- configuredUsername = new SystemProperties(
- new UserConfiguration(
- new SystemConfiguration(
- new DefaultConfiguration()))).getRhlogin();
+ configuredUsername =
+ new SystemProperties(
+ new UserConfiguration(
+ new SystemConfiguration(
+ new DefaultConfiguration()))).getRhlogin();
} catch (Exception e) {
// do nothing
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizard.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizard.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -11,9 +11,10 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IUser;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPage.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -50,14 +50,15 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.IEmbeddableCartridge;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import org.jboss.tools.openshift.express.internal.ui.wizard.CreationLogDialog.LogEntry;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EmbedCartridgeWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -19,12 +19,13 @@
import org.eclipse.core.databinding.observable.list.ListDiff;
import org.eclipse.core.databinding.observable.list.ListDiffEntry;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.IEmbeddableCartridge;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IEmbeddableCartridge;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizard.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizard.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -11,9 +11,10 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IUser;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -37,12 +37,13 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.OpenShiftApplicationNotAvailableException;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
-import org.jboss.tools.openshift.express.internal.client.Cartridge;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import com.openshift.express.client.Cartridge;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.OpenShiftApplicationNotAvailableException;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -15,10 +15,11 @@
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPage.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -47,11 +47,12 @@
import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
import org.jboss.tools.common.ui.databinding.ParametrizableWizardPageSupport;
import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.FileUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -18,14 +18,15 @@
import org.eclipse.jsch.internal.core.IConstants;
import org.eclipse.jsch.internal.core.JSchCorePlugin;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.client.IDomain;
-import org.jboss.tools.openshift.express.client.ISSHPublicKey;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
-import org.jboss.tools.openshift.express.client.SSHKeyPair;
-import org.jboss.tools.openshift.express.client.SSHPublicKey;
import org.jboss.tools.openshift.express.internal.ui.utils.FileUtils;
+import com.openshift.express.client.IDomain;
+import com.openshift.express.client.ISSHPublicKey;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+import com.openshift.express.client.SSHKeyPair;
+import com.openshift.express.client.SSHPublicKey;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationStrategy.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationStrategy.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AbstractImportApplicationStrategy.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -42,12 +42,13 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.Server;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim <adietish(a)redhat.com>
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AddToExistingProjectStrategy.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AddToExistingProjectStrategy.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/AddToExistingProjectStrategy.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -28,11 +28,12 @@
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.openshift.egit.core.EGitUtils;
import org.jboss.tools.openshift.egit.core.GitIgnore;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.utils.FileUtils;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim <adietish(a)redhat.com>
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProjectStrategy.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProjectStrategy.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportNewProjectStrategy.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -27,14 +27,15 @@
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerType;
import org.jboss.tools.openshift.egit.core.EGitUtils;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.ImportFailedException;
import org.jboss.tools.openshift.express.internal.ui.WontOverwriteException;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.project.GeneralProjectImportOperation;
import org.jboss.tools.openshift.express.internal.ui.wizard.appimport.project.MavenProjectImportOperation;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim <adietish(a)redhat.com>
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizard.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -31,7 +31,6 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.ImportFailedException;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.WontOverwriteException;
@@ -39,6 +38,8 @@
import org.jboss.tools.openshift.express.internal.ui.wizard.ApplicationWizardPage;
import org.jboss.tools.openshift.express.internal.ui.wizard.CredentialsWizardPage;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim
*/
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java 2011-12-15 12:08:14 UTC (rev 37348)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ImportProjectWizardModel.java 2011-12-15 12:45:37 UTC (rev 37349)
@@ -21,12 +21,13 @@
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerType;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
-import org.jboss.tools.openshift.express.client.IApplication;
-import org.jboss.tools.openshift.express.client.ICartridge;
-import org.jboss.tools.openshift.express.client.IUser;
-import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.ui.wizard.AdapterWizardPageModel;
+import com.openshift.express.client.IApplication;
+import com.openshift.express.client.ICartridge;
+import com.openshift.express.client.IUser;
+import com.openshift.express.client.OpenShiftException;
+
/**
* @author André Dietisheim <adietish(a)redhat.com>
*/
14 years, 4 months
JBoss Tools SVN: r37348 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-15 07:08:14 -0500 (Thu, 15 Dec 2011)
New Revision: 37348
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
Log:
RSE ui for eap6 and as7.1 was not correct
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java 2011-12-15 11:01:44 UTC (rev 37347)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java 2011-12-15 12:08:14 UTC (rev 37348)
@@ -64,6 +64,7 @@
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
@@ -124,15 +125,14 @@
JBossServer jbs = cServer.getOriginal() == null ?
ServerConverter.getJBossServer(cServer) :
ServerConverter.getJBossServer(cServer.getOriginal());
- if( jbs != null && !cServer.getServerType().getId().equals(IJBossToolingConstants.SERVER_AS_70) ) {
+ if( jbs == null )
+ composite = new DeployOnlyRSEPrefComposite(parent, SWT.NONE, callback);
+ else if( !ServerUtil.isJBoss7(cServer.getServerType()))
composite = new JBossRSEDeploymentPrefComposite(parent, SWT.NONE, callback);
- } else if( cServer.getServerType().getId().equals(IJBossToolingConstants.SERVER_AS_70) ){
+ else if( ServerUtil.isJBoss7(cServer.getServerType())){
composite = new JBoss7RSEDeploymentPrefComposite(parent, SWT.NONE, callback);
- // TODO add for jboss 7
- } else {
- composite = new DeployOnlyRSEPrefComposite(parent, SWT.NONE, callback);
}
- //return composite;
+ // NEW_SERVER_ADAPTER potential location for new server details
}
public static abstract class RSEDeploymentPreferenceComposite extends Composite implements PropertyChangeListener {
14 years, 4 months
JBoss Tools SVN: r37347 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-12-15 06:01:44 -0500 (Thu, 15 Dec 2011)
New Revision: 37347
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/template/VpeStyleCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-5861 - CSS @import support was added.
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 2011-12-15 08:04:30 UTC (rev 37346)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-12-15 11:01:44 UTC (rev 37347)
@@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.regex.Matcher;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
@@ -57,6 +58,7 @@
import org.jboss.tools.vpe.editor.template.VpeTemplateSafeWrapper;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.Docbook;
import org.jboss.tools.vpe.editor.util.FaceletUtil;
import org.jboss.tools.vpe.editor.util.HTML;
@@ -1080,7 +1082,7 @@
*/
public nsIDOMNode addLinkNodeToHead(String href_val, String ext_val,
boolean firstElement) {
- nsIDOMElement newNode = createLinkNode(href_val,
+ nsIDOMElement newNode = createInlineStyleNode(href_val,
ATTR_REL_STYLESHEET_VALUE, ext_val);
// TODO Dzmitry Sakovich
@@ -1096,7 +1098,7 @@
public nsIDOMNode replaceLinkNodeToHead(nsIDOMNode oldNode,
String href_val, String ext_val) {
- nsIDOMNode newNode = createLinkNode(href_val,
+ nsIDOMNode newNode = createInlineStyleNode(href_val,
ATTR_REL_STYLESHEET_VALUE, ext_val);
getHeadNode().replaceChild(newNode, oldNode);
return newNode;
@@ -1115,10 +1117,9 @@
getHeadNode().removeChild(node);
}
- private nsIDOMElement createLinkNode(String href_val, String rel_val,
- String ext_val) {
- nsIDOMElement linkNode = null;
- if ((ATTR_REL_STYLESHEET_VALUE.equalsIgnoreCase(rel_val))
+ private nsIDOMElement createInlineStyleNode(String href_val, String rel_val, String ext_val) {
+ nsIDOMElement inlineStyle = null;
+ if (ATTR_REL_STYLESHEET_VALUE.equalsIgnoreCase(rel_val)
&& href_val.startsWith("file:")) { //$NON-NLS-1$
/*
* Because of the Mozilla caches the linked css files we replace tag
@@ -1126,33 +1127,43 @@
* vpe="ATTR_VPE_INLINE_LINK_VALUE">file content</style> It is
* LinkReplacer
*/
- linkNode = getVisualDocument().createElement(HTML.TAG_STYLE);
- linkNode.setAttribute(ATTR_VPE, ATTR_VPE_INLINE_LINK_VALUE);
+ inlineStyle = getVisualDocument().createElement(HTML.TAG_STYLE);
+ inlineStyle.setAttribute(ATTR_VPE, ATTR_VPE_INLINE_LINK_VALUE);
/* Copy links attributes into our <style> */
- linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_HREF, href_val);
- linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_EXT, ext_val);
+ inlineStyle.setAttribute(VpeTemplateManager.ATTR_LINK_HREF, href_val);
+ inlineStyle.setAttribute(VpeTemplateManager.ATTR_LINK_EXT, ext_val);
BufferedReader in = null;
try {
StringBuilder styleText = new StringBuilder(EMPTY_STRING);
URL url = new URL((new Path(href_val)).toOSString());
String fileName = url.getFile();
- in = new BufferedReader(new FileReader(
- (fileName)));
+ in = new BufferedReader(new FileReader((fileName)));
String str = EMPTY_STRING;
while ((str = in.readLine()) != null) {
styleText.append(str);
}
+ in.close();
String styleForParse = styleText.toString();
- styleForParse = VpeStyleUtil.addFullPathIntoURLValue(
- styleForParse, href_val);
-
- in.close();
- nsIDOMText textNode = getVisualDocument()
- .createTextNode(styleForParse);
- linkNode.appendChild(textNode);
- return linkNode;
+ /*
+ * https://issues.jboss.org/browse/JBIDE-5861
+ * Add nested @import constructions
+ */
+ List<String> imports = VpeStyleUtil.findCssImportConstruction(styleForParse, pageContext);
+ if (imports.size() > 0) {
+ for (String key : imports) {
+ addLinkNodeToHead(key, "css_nested_import_construction", false); //$NON-NLS-1$
+ }
+ /*
+ * Replace @import constructions
+ */
+ Matcher m = VpeStyleUtil.CSS_IMPORT_PATTERN.matcher(styleForParse);
+ styleForParse = m.replaceAll(Constants.EMPTY);
+ }
+ styleForParse = VpeStyleUtil.addFullPathIntoURLValue(styleForParse, href_val);
+ inlineStyle.appendChild(getVisualDocument().createTextNode(styleForParse));
+ return inlineStyle;
} catch (FileNotFoundException fnfe) {
/* File which was pointed by user is not exists. Do nothing. */
} catch (IOException ioe) {
@@ -1168,12 +1179,12 @@
}
}
- linkNode = getVisualDocument().createElement(HTML.TAG_LINK);
- linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_REL, rel_val);
- linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_HREF, href_val);
- linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_EXT, ext_val);
+ inlineStyle = getVisualDocument().createElement(HTML.TAG_LINK);
+ inlineStyle.setAttribute(VpeTemplateManager.ATTR_LINK_REL, rel_val);
+ inlineStyle.setAttribute(VpeTemplateManager.ATTR_LINK_HREF, href_val);
+ inlineStyle.setAttribute(VpeTemplateManager.ATTR_LINK_EXT, ext_val);
- return linkNode;
+ return inlineStyle;
}
private boolean isLinkReplacer(nsIDOMNode node) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeStyleCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeStyleCreator.java 2011-12-15 08:04:30 UTC (rev 37346)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeStyleCreator.java 2011-12-15 11:01:44 UTC (rev 37347)
@@ -10,9 +10,13 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template;
+import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -35,9 +39,24 @@
String text = null;
if (textNode != null) {
text = textNode.getNodeValue();
+ /*
+ * https://issues.jboss.org/browse/JBIDE-5861
+ * Add inline <style> element for each found css @import
+ */
+ VpeVisualDomBuilder vvdb = pageContext.getVisualBuilder();
+ List<String> imports = VpeStyleUtil.findCssImportConstruction(text, pageContext);
+ if (imports.size() > 0) {
+ for (String key : imports) {
+ vvdb.addLinkNodeToHead(key, "css_import_construction", false); //$NON-NLS-1$
+ }
+ /*
+ * Replace @import constructions
+ */
+ Matcher m = VpeStyleUtil.CSS_IMPORT_PATTERN.matcher(text);
+ text = m.replaceAll(Constants.EMPTY);
+ }
text = VpeStyleUtil.addFullPathIntoURLValue(text, pageContext);
}
-
nsIDOMNode newStyle = pageContext.getVisualBuilder()
.addStyleNodeToHead(text);
visualNodeMap.put(this, newStyle);
@@ -47,14 +66,11 @@
@Override
public void removeElement(VpePageContext pageContext,
Element sourceElement, Map visualNodeMap) {
-
nsIDOMNode styleNode = (nsIDOMNode) visualNodeMap.get(this);
-
if (styleNode != null) {
pageContext.getVisualBuilder().removeStyleNodeFromHead(styleNode);
visualNodeMap.remove(this);
}
-
}
@Override
@@ -69,8 +85,8 @@
}
nsIDOMNode newStyleNode;
if (oldStyleNode == null) {
- newStyleNode = pageContext.getVisualBuilder().addStyleNodeToHead(
- text);
+ newStyleNode = pageContext.getVisualBuilder().
+ addStyleNodeToHead(text);
visualNodeMap.put(this, newStyleNode);
} else {
newStyleNode = pageContext.getVisualBuilder()
@@ -79,6 +95,5 @@
visualNodeMap.remove(this);
visualNodeMap.put(this, newStyleNode);
}
-
}
-}
+}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-12-15 08:04:30 UTC (rev 37346)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2011-12-15 11:01:44 UTC (rev 37347)
@@ -19,6 +19,8 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -81,6 +83,8 @@
* (.*) should be replaced with ([^;]*)
*/
public static final Pattern CSS_URL_PATTERN = Pattern.compile("(?<=\\burl\\b)(?:[\\p{Space}]*\\()[\\p{Space}]*([^;]*)[\\p{Space}]*(?:\\)[\\p{Space}]*)(?=(?>[^\\)]*;|[^\\)]*))"); //$NON-NLS-1$
+ public static final Pattern CSS_IMPORT_PATTERN = Pattern.compile("@import[\\p{Space}]+(?:\\burl\\b[\\p{Space}]*\\()*[\\p{Space}]*([^;]*)[\\p{Space}]*(?:\\)[\\p{Space}]*(?=(?>[^\\)]*;|[^\\)]*)))*"); //$NON-NLS-1$
+ public static final Pattern CSS_URI_PATTERN = Pattern.compile("(?:\\\"{1}(.*)\\\"{1})|(?:\\'{1}(.*)\\'{1})"); //$NON-NLS-1$
public static String ATTR_URL = "url"; //$NON-NLS-1$
public static String OPEN_BRACKET = "("; //$NON-NLS-1$
@@ -438,11 +442,7 @@
if (urls.length == 1) {
return value;
}
- IFile file = null;
- final VpeIncludeInfo vii = pageContext.getVisualBuilder().getCurrentIncludeInfo();
- if (vii != null && (vii.getStorage() instanceof IFile)) {
- file = (IFile) vii.getStorage();
- }
+ IFile file = getSourceFileFromPageContext(pageContext);
for (int i = 1; i < urls.length; i++) {
urls[i] = removeQuotesUpdate(urls[i]);
String[] urlParts = splitURL(urls[i]);
@@ -450,7 +450,7 @@
continue;
}
if (file != null) {
- urlParts[1] = processUrl(urlParts[1], file);
+ urlParts[1] = processUrl(urlParts[1], file, true);
}
urls[i] = collectArrayInto1Str(urlParts);
}
@@ -484,7 +484,7 @@
// ignore
}
if (sourceFile != null) {
- urlParts[1] = processUrl(urlParts[1], sourceFile);
+ urlParts[1] = processUrl(urlParts[1], sourceFile, true);
} else {
urlParts[1] = updateURLFilePath(urlParts[1], href_val);
if (urlParts[1] == null) {
@@ -685,20 +685,26 @@
public static IPath getRootPath(IEditorInput input) {
IPath rootPath = null;
if (input instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput) input).getFile().getProject();
- if (project != null && project.isOpen()) {
- IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
- if (modelNature != null) {
- XModel model = modelNature.getModel();
- String rootPathStr = WebProject.getInstance(model).getWebRootLocation();
- if (rootPathStr != null) {
- rootPath = new Path(rootPathStr);
- } else {
- rootPath = project.getLocation();
- }
+ rootPath = getRootPath(((IFileEditorInput) input).getFile());
+ }
+ return rootPath;
+ }
+
+ public static IPath getRootPath(IFile inputFile) {
+ IPath rootPath = null;
+ IProject project = inputFile.getProject();
+ if (project != null && project.isOpen()) {
+ IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
+ if (modelNature != null) {
+ XModel model = modelNature.getModel();
+ String rootPathStr = WebProject.getInstance(model).getWebRootLocation();
+ if (rootPathStr != null) {
+ rootPath = new Path(rootPathStr);
} else {
rootPath = project.getLocation();
}
+ } else {
+ rootPath = project.getLocation();
}
}
return rootPath;
@@ -783,7 +789,7 @@
return Integer.toString(position) + PX_STRING;
}
- public static String processUrl(String url, IFile baseFile) {
+ public static String processUrl(String url, IFile baseFile, boolean putIntoQuotes) {
String resolvedUrl = url.replaceFirst(
"^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}", Constants.EMPTY); //$NON-NLS-1$
resolvedUrl = ElServiceUtil.replaceEl(baseFile, resolvedUrl);
@@ -799,22 +805,25 @@
}
if (uri == null || !uri.isAbsolute()) {
String decodedUrl = decodeUrl(resolvedUrl);
- Path path = new Path(decodedUrl);
- if (decodedUrl.startsWith("/") && (null != path.segment(0))//$NON-NLS-1$
- && path.segment(0).equals(baseFile.getProject().getName())) {
- decodedUrl = "/" + path.removeFirstSegments(1).toPortableString(); //$NON-NLS-1$
- }
+ Path decodedPath = new Path(decodedUrl);
+ if (decodedUrl.startsWith("/") && (null != decodedPath.segment(0))//$NON-NLS-1$
+ && decodedPath.segment(0).equals(baseFile.getProject().getName())) {
+ decodedUrl = "/" + decodedPath.removeFirstSegments(1).toPortableString(); //$NON-NLS-1$
+ }
IFile file = FileUtil.getFile(decodedUrl, baseFile);
if (file != null && file.getLocation() != null) {
resolvedUrl = pathToUrl(file.getLocation());
- }
+ }
}
/*
* https://issues.jboss.org/browse/JBIDE-9975
* Put the URL into quotes.
* It's default xulrunner behavior.
*/
- return QUOTE_STRING + resolvedUrl + QUOTE_STRING;
+ if (putIntoQuotes) {
+ resolvedUrl = QUOTE_STRING + resolvedUrl + QUOTE_STRING;
+ }
+ return resolvedUrl;
}
private static String pathToUrl(IPath location) {
@@ -858,4 +867,71 @@
: HTML.STYLE_VALUE_NONE, HTML.STYLE_PRIORITY_IMPORTANT);
}
+
+ /**
+ * Finds CSS @import url(".."); construction
+ *
+ * @param cssText the css text
+ * @param pageContext VPE page context
+ * @return the map with the import statement as a key and the css file path as a value
+ */
+ public static List<String> findCssImportConstruction(String cssText, VpePageContext pageContext) {
+ ArrayList<String> list = new ArrayList<String>();
+ IFile sourceFile = getSourceFileFromPageContext(pageContext);
+ Matcher m = CSS_IMPORT_PATTERN.matcher(cssText);
+ while (m.find()) {
+ /*
+ * Path should be a well formed URI
+ */
+ list.add(processUrl(getCorrectURI(m.group(1)), sourceFile, false));
+ }
+ return list;
+ }
+
+ /**
+ * Gets the source file from pageContext
+ *
+ * @param pageContext
+ * @return the opened file
+ */
+ public static IFile getSourceFileFromPageContext(VpePageContext pageContext) {
+ IFile file = null;
+ final VpeIncludeInfo vii = pageContext.getVisualBuilder().getCurrentIncludeInfo();
+ if ((vii != null) && (vii.getStorage() instanceof IFile)) {
+ file = (IFile) vii.getStorage();
+ }
+ return file;
+ }
+
+ /**
+ * Determine correct uri in the input path:
+ * Remove quotes and brackets
+ *
+ * @param path input path
+ * @return correct URI string
+ */
+ private static String getCorrectURI(String path) {
+ String uri = path;
+ /*
+ * Closing bracket appears due to regex pattern.
+ * Should be removed.
+ */
+ if (path.endsWith(CLOSE_BRACKET)) {
+ uri = uri.substring(0, uri.length() - 1);
+ }
+ Matcher m = CSS_URI_PATTERN.matcher(uri);
+ /*
+ * Find uri in " or ' quotes
+ */
+ if (m.find()) {
+ if ((m.group(1) != null)
+ && !EMPTY_STRING.equalsIgnoreCase(m.group(1))) {
+ uri = m.group(1);
+ } else if ((m.group(2) != null)
+ && !EMPTY_STRING.equalsIgnoreCase(m.group(2))) {
+ uri = m.group(2);
+ }
+ }
+ return uri;
+ }
}
14 years, 4 months
JBoss Tools SVN: r37346 - trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/xpl.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-12-15 03:04:30 -0500 (Thu, 15 Dec 2011)
New Revision: 37346
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/xpl/FormTextEntry.java
Log:
https://issues.jboss.org/browse/JBIDE-10227
Dispose Gc
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/xpl/FormTextEntry.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/xpl/FormTextEntry.java 2011-12-15 02:07:45 UTC (rev 37345)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/xpl/FormTextEntry.java 2011-12-15 08:04:30 UTC (rev 37346)
@@ -369,6 +369,7 @@
}
last = loc;
}
+ gc.dispose();
String lastLine = src.substring(saved, last);
buff.append(lastLine);
return buff.toString();
14 years, 4 months
JBoss Tools SVN: r37345 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-14 21:07:45 -0500 (Wed, 14 Dec 2011)
New Revision: 37345
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10187 Add support for a @SuppressWarnings
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-15 01:57:14 UTC (rev 37344)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-15 02:07:45 UTC (rev 37345)
@@ -107,6 +107,6 @@
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 35);
file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 31);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 20, 24, 28, 31);
}
}
\ No newline at end of file
14 years, 4 months
JBoss Tools SVN: r37344 - in trunk: cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-14 20:57:14 -0500 (Wed, 14 Dec 2011)
New Revision: 37344
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/Fish.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java
Log:
https://issues.jboss.org/browse/JBIDE-10187 Add support for a @SuppressWarnings
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java 2011-12-15 01:47:45 UTC (rev 37343)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java 2011-12-15 01:57:14 UTC (rev 37344)
@@ -27,4 +27,6 @@
@Produces
public void setFish3(Fish fishBROKEN) {
}
+
+ @Inject Fish fish3BROKEN;
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/Fish.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/Fish.java 2011-12-15 01:47:45 UTC (rev 37343)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/suppresswarnings/Fish.java 2011-12-15 01:57:14 UTC (rev 37344)
@@ -30,4 +30,7 @@
@Produces
public void setFish3(Fish fishBROKEN) {
}
+
+ @SuppressWarnings("unsatisfiedInjectionPoints")
+ @Inject Fish fish3OK;
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-15 01:47:45 UTC (rev 37343)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/SuppressWarningsTests.java 2011-12-15 01:57:14 UTC (rev 37344)
@@ -76,7 +76,7 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 31);
file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
- AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 20, 24, 28);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 20, 24, 28, 31);
}
public void testMultipleSuppress() throws Exception {
@@ -101,4 +101,12 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, 17, 19, 26);
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
+
+ public void testShortName() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/Fish.java");
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 35);
+
+ file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/suppresswarnings/AnotherFish.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, 31);
+ }
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java 2011-12-15 01:47:45 UTC (rev 37343)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationErrorManager.java 2011-12-15 01:57:14 UTC (rev 37344)
@@ -192,9 +192,14 @@
} else if(v instanceof String) {
warnings = new String[]{v.toString()};
}
+ String shortKey = null;
+ int dot = preferenceKey.lastIndexOf('.');
+ if(dot>-1) {
+ shortKey = preferenceKey.substring(dot+1);
+ }
for (Object warning : warnings) {
String trimed = warning.toString().trim();
- if(trimed.equals(preferenceKey) || trimed.equals(ALL_WARNINGS)) {
+ if(shortKey!=null && trimed.equals(shortKey) || trimed.equals(preferenceKey) || trimed.equals(ALL_WARNINGS)) {
// Ok, we seem to have such a suppress. Let's make sure the full name of annotation is java.lang.SuppressWarnings
if(EclipseJavaUtil.checkAnnotationByFulltName(annotation, SUPPRESS_WARNINGS_ANNOTATION_FULL)) {
result = annotation;
14 years, 4 months
JBoss Tools SVN: r37343 - in trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui: marker and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-12-14 20:47:45 -0500 (Wed, 14 Dec 2011)
New Revision: 37343
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
Log:
Add @SuppressWarnings quick fix https://issues.jboss.org/browse/JBIDE-10187
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-15 01:46:25 UTC (rev 37342)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/AddSuppressWarningsMarkerResolution.java 2011-12-15 01:47:45 UTC (rev 37343)
@@ -50,6 +50,7 @@
IMarkerResolution2 {
public static final String SUPPRESS_WARNINGS_ANNOTATION = "SuppressWarnings";
public static final String SPACE = " "; //$NON-NLS-1$
+ public static final String DOT = "."; //$NON-NLS-1$
public static final String AT = "@"; //$NON-NLS-1$
private static final String PROBLEM_ID = JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN;
private SP preferences = new SP();
@@ -63,7 +64,11 @@
this.file = file;
this.element = getAnnatatableElement(element);
this.preferenceKey = preferenceKey;
- label = NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS_TITLE, element.getElementName());
+ String shortName = getShortName(preferenceKey);
+ label = NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS_TITLE, shortName, element.getElementName());
+ if(element instanceof IMethod){
+ label += "()";
+ }
}
private IAnnotatable getAnnatatableElement(IJavaElement element){
@@ -121,6 +126,16 @@
return null;
}
+ public static String getShortName(String qualifiedName){
+ int lastDot = qualifiedName.lastIndexOf(DOT);
+ String name;
+ if(lastDot < 0)
+ name = qualifiedName;
+ else
+ name = qualifiedName.substring(lastDot+1);
+ return name;
+ }
+
private void disablePreference(){
String value = preferences.getProjectPreference(file.getProject(), PROBLEM_ID);
if(!SeverityPreferences.IGNORE.equals(value)){
@@ -153,7 +168,7 @@
CommonUIMessages.ADD_SUPPRESS_WARNINGS_MESSAGE+
NLS.bind(CommonUIMessages.ADD_SUPPRESS_WARNINGS_QUESTION2, file.getProject().getName()),
MessageDialog.QUESTION_WITH_CANCEL,
- new String[]{"Cancel", "Workspace", file.getProject().getName()},
+ new String[]{"Cancel", "Workspace", "Project"},
0);
int result = dialog.open();
if(result == 1){
@@ -208,10 +223,25 @@
str += "({";
for(IMemberValuePair pair : annotation.getMemberValuePairs()){
- if(pair.getValue().toString().equals(parameter)){
- return false;
+ if(pair.getValueKind() == IMemberValuePair.K_STRING){
+ Object value = pair.getValue();
+ if(value instanceof String){
+ if(value.toString().equals(parameter)){
+ return false;
+ }
+ str += "\""+value+"\", ";
+ }else if(value instanceof Object[]){
+ Object[] array = (Object[])value;
+ for(Object a : array){
+ if(a instanceof String){
+ if(a.toString().equals(parameter)){
+ return false;
+ }
+ str += "\""+a+"\", ";
+ }
+ }
+ }
}
- str += "\""+pair.getValue()+"\", ";
}
str += "\""+parameter+"\"";
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2011-12-15 01:46:25 UTC (rev 37342)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityResolutionGenerator.java 2011-12-15 01:47:45 UTC (rev 37343)
@@ -17,6 +17,9 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.jboss.tools.common.EclipseUtil;
@@ -42,10 +45,17 @@
if(preferenceKey != null && preferencePageId != null){
resolutions.add(new ConfigureProblemSeverityMarkerResolution(preferencePageId, preferenceKey));
boolean enabled = marker.getAttribute(ValidationErrorManager.SUPPRESS_WARNINGS_ENABLED_ATTRIBUTE, false);
- if(enabled){
+ int severity = marker.getAttribute(IMarker.SEVERITY, 0);
+ if(enabled && severity == IMarker.SEVERITY_WARNING){
IJavaElement element = findJavaElement(file, position);
if(element != null){
- resolutions.add(new AddSuppressWarningsMarkerResolution(file, element, preferenceKey));
+ if(element instanceof IMethod){
+ ILocalVariable parameter = findParameter((IMethod)element, position);
+ if(parameter != null){
+ resolutions.add(new AddSuppressWarningsMarkerResolution(file, parameter, preferenceKey));
+ }
+ resolutions.add(new AddSuppressWarningsMarkerResolution(file, element, preferenceKey));
+ }
}
}
}
@@ -69,6 +79,15 @@
return null;
}
+ private ILocalVariable findParameter(IMethod method, int position) throws JavaModelException{
+ for(ILocalVariable parameter : method.getParameters()){
+ if(parameter.getSourceRange().getOffset() <= position && parameter.getSourceRange().getOffset()+parameter.getSourceRange().getLength() > position){
+ return parameter;
+ }
+ }
+ return null;
+ }
+
@Override
public boolean hasResolutions(IMarker marker) {
try {
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2011-12-15 01:46:25 UTC (rev 37342)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/messages.properties 2011-12-15 01:47:45 UTC (rev 37343)
@@ -34,7 +34,7 @@
MANDATORYSTRING_VALIDATOR_MUST_PROVIDE_VALUE=You have to provide a {0}.
CONFIGURE_PROBLEM_SEVERITY=Configure Problem Severity
-ADD_SUPPRESS_WARNINGS_TITLE=Add @SuppressWarnings to ''{0}''
+ADD_SUPPRESS_WARNINGS_TITLE=Add @SuppressWarnings ''{0}'' to ''{1}''
ADD_SUPPRESS_WARNINGS_MESSAGE=This quick fix uses warning names that are not supported by The Java Validator and will cause \"Unsupported @SuppressWarning\" problem message.\n\n
ADD_SUPPRESS_WARNINGS_QUESTION1=Do you want to disable 'Unsupported @SuppressWarnings' validation?
ADD_SUPPRESS_WARNINGS_QUESTION2=Do you want to disable 'Unsupported @SuppressWarnings' validation on the Workspace or on the project ''{0}''?
\ No newline at end of file
14 years, 4 months