JBoss Tools SVN: r38256 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-27 18:58:59 -0500 (Fri, 27 Jan 2012)
New Revision: 38256
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
Log:
[JBIDE-10724] show styled text before link widget (tree editor) becomes visible
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/AbstractPropertyCellLabelProvider.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -10,14 +10,14 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.propertytable;
-import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
import org.eclipse.jface.viewers.ViewerCell;
/**
* @author Xavier Coulon
* @author Andre Dietisheim
*/
-public abstract class AbstractPropertyCellLabelProvider extends CellLabelProvider {
+public abstract class AbstractPropertyCellLabelProvider extends StyledCellLabelProvider {
@Override
public void update(ViewerCell cell) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -10,10 +10,12 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.propertytable;
+import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.graphics.TextStyle;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Tree;
import org.jboss.tools.common.ui.BrowserUtil;
@@ -28,6 +30,8 @@
protected void update(IProperty property, ViewerCell cell) {
if (property.isLink()) {
+ // tree editor takes some time to display, show text in the meantime
+ createStyledText(property, cell);
createLink(property, cell);
} else {
cell.setText(property.getValue());
@@ -39,10 +43,23 @@
link.setText("<a>" + property.getValue() + "</a>");
link.setBackground(cell.getBackground());
link.addMouseListener(onLinkClicked(property.getValue()));
-
+
TreeUtils.createTreeEditor(link, property.getValue(), cell);
}
+ private void createStyledText(IProperty property, final ViewerCell cell) {
+ StyledString.Styler style = new StyledString.Styler() {
+ @Override
+ public void applyStyles(TextStyle textStyle) {
+ textStyle.foreground = cell.getControl().getDisplay().getSystemColor(SWT.COLOR_BLUE);
+ textStyle.underline = true;
+ }
+ };
+ StyledString styledString = new StyledString(property.getValue(), style);
+ cell.setStyleRanges(styledString.getStyleRanges());
+ cell.setText(styledString.getString());
+ }
+
protected MouseAdapter onLinkClicked(final String url) {
return new MouseAdapter() {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 21:25:20 UTC (rev 38255)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 23:58:59 UTC (rev 38256)
@@ -66,12 +66,12 @@
{
treeEditor.grabHorizontal = true;
treeEditor.grabVertical = true;
- treeEditor.horizontalAlignment = SWT.CENTER;
- treeEditor.verticalAlignment = SWT.CENTER;
+ treeEditor.horizontalAlignment = SWT.FILL;
+ treeEditor.verticalAlignment = SWT.FILL;
TreeItem treeItem = ( TreeItem ) cell.getItem();
treeEditor.setEditor( control, treeItem, cell.getColumnIndex() );
// ensure cell is as large as space needed for link
- cell.setText( " " + cellText + " ");
+ //cell.setText( " " + cellText + " ");
}
/**
14 years, 2 months
JBoss Tools SVN: r38255 - trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-27 16:25:20 -0500 (Fri, 27 Jan 2012)
New Revision: 38255
Modified:
trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
Log:
set version range [2.3.0,3.0.0) instead of just 2.3.0 (JBIDE-10742)
Modified: trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2012-01-27 21:15:14 UTC (rev 38254)
+++ trunk/gwt/plugins/org.jboss.tools.gwt.core/META-INF/MANIFEST.MF 2012-01-27 21:25:20 UTC (rev 38255)
@@ -8,7 +8,7 @@
Require-Bundle:
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
com.google.gwt.eclipse.core,
- com.google.gwt.eclipse.sdkbundle;bundle-version="2.3.0",
+ com.google.gwt.eclipse.sdkbundle;bundle-version="[2.3.0,3.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
14 years, 2 months
JBoss Tools SVN: r38254 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-27 16:15:14 -0500 (Fri, 27 Jan 2012)
New Revision: 38254
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-10739
https://issues.jboss.org/browse/JBIDE-10739
Method EclipseResourceUtil.getFirstWebContentResource() should just take first existing element of array returned by getWebRootFolders; even if that fails, it should not try another logic.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2012-01-27 21:08:52 UTC (rev 38253)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2012-01-27 21:15:14 UTC (rev 38254)
@@ -455,16 +455,12 @@
IVirtualComponent vc = ComponentCore.createComponent(project);
if (vc == null || vc.getRootFolder() == null)
return null;
- IPath path = WebUtils.getFirstWebContentPath(project);
- if(path != null) {
- IFolder f = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- if(f.exists()) {
- return f;
+ IContainer[] cs = WebUtils.getWebRootFolders(project, true);
+ for (IContainer c: cs) {
+ if(c.exists()) {
+ return c;
}
}
- if (ModuleCoreNature.isFlexibleProject(project)) {
- return vc.getRootFolder().getUnderlyingResource();
- }
return null;
}
14 years, 2 months
JBoss Tools SVN: r38253 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/web.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-27 16:08:52 -0500 (Fri, 27 Jan 2012)
New Revision: 38253
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/web/WebUtils.java
Log:
JBIDE-10739
https://issues.jboss.org/browse/JBIDE-10739
Method WebUtils.getFirstWebContentPath() should just take first existing element of array returned by getWebRootFolders; even if that fails, it should not try another logic.
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/web/WebUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/web/WebUtils.java 2012-01-27 20:21:57 UTC (rev 38252)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/web/WebUtils.java 2012-01-27 21:08:52 UTC (rev 38253)
@@ -79,10 +79,6 @@
return c.getFullPath();
}
}
- if (ModuleCoreNature.isFlexibleProject(project)) {
- modulePath = vc.getRootFolder().getWorkspaceRelativePath();
- }
-
return modulePath;
}
14 years, 2 months
JBoss Tools SVN: r38252 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-27 15:21:57 -0500 (Fri, 27 Jan 2012)
New Revision: 38252
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java
Log:
JBIDE-10739
https://issues.jboss.org/browse/JBIDE-10739
Web content of project may be its root location, avoid request project.getFolder("/"), it results in illegal argument exception.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java 2012-01-27 20:04:05 UTC (rev 38251)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java 2012-01-27 20:21:57 UTC (rev 38252)
@@ -264,9 +264,7 @@
IContainer[] folders = WebUtils.getWebRootFolders(project);
if(folders == null || folders.length == 0)
return null;
- IFolder webFolder = ResourcesPlugin.getWorkspace().getRoot()
- .getFolder(folders[0].getFullPath());
- IFolder resourcesFolder = webFolder.getFolder("resources"); //$NON-NLS-1$
+ IFolder resourcesFolder = folders[0].getFolder(new Path("resources")); //$NON-NLS-1$
NullProgressMonitor monitor = new NullProgressMonitor();
if (!resourcesFolder.exists()) {
resourcesFolder.create(true, true, monitor);
14 years, 2 months
JBoss Tools SVN: r38251 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-27 15:04:05 -0500 (Fri, 27 Jan 2012)
New Revision: 38251
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/SearchUtil.java
Log:
JBIDE-10739
https://issues.jboss.org/browse/JBIDE-10739
Web content of project may be its root location, avoid request project.getFolder("/"), it results in illegal argument exception.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-27 19:45:37 UTC (rev 38250)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/RefactorSearcher.java 2012-01-27 20:04:05 UTC (rev 38251)
@@ -159,7 +159,7 @@
IPath path = ProjectHome.getFirstWebContentPath(project);
if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
+ return path.segmentCount() > 1 ? project.getFolder(path.removeFirstSegments(1)) : project;
return null;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/SearchUtil.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/SearchUtil.java 2012-01-27 19:45:37 UTC (rev 38250)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/refactoring/SearchUtil.java 2012-01-27 20:04:05 UTC (rev 38251)
@@ -129,7 +129,7 @@
IPath path = ProjectHome.getFirstWebContentPath(project);
if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
+ return path.segmentCount() > 1 ? project.getFolder(path.removeFirstSegments(1)) : project;
return null;
}
14 years, 2 months
JBoss Tools SVN: r38250 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-27 14:45:37 -0500 (Fri, 27 Jan 2012)
New Revision: 38250
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
Log:
[JBIDE-10724] open external browser when link in property table is clicked
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 19:36:09 UTC (rev 38249)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/propertytable/PropertyValueCellLabelProvider.java 2012-01-27 19:45:37 UTC (rev 38250)
@@ -12,8 +12,12 @@
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Tree;
+import org.jboss.tools.common.ui.BrowserUtil;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.TreeUtils;
/**
@@ -30,10 +34,23 @@
}
}
- private void createLink(IProperty property, final ViewerCell cell) {
+ protected void createLink(IProperty property, final ViewerCell cell) {
Link link = new Link((Tree) cell.getControl(), SWT.NONE);
- link.setText("<a>" + property.getValue() +"</a>");
+ link.setText("<a>" + property.getValue() + "</a>");
link.setBackground(cell.getBackground());
+ link.addMouseListener(onLinkClicked(property.getValue()));
+
TreeUtils.createTreeEditor(link, property.getValue(), cell);
}
+
+ protected MouseAdapter onLinkClicked(final String url) {
+ return new MouseAdapter() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ BrowserUtil.checkedCreateExternalBrowser(
+ url, OpenShiftUIActivator.PLUGIN_ID, OpenShiftUIActivator.getDefault().getLog());
+ }
+ };
+ }
}
14 years, 2 months
JBoss Tools SVN: r38249 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-27 14:36:09 -0500 (Fri, 27 Jan 2012)
New Revision: 38249
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
Log:
JBIDE-10739
https://issues.jboss.org/browse/JBIDE-10739
Web content of project may be its root location, avoid request project.getFolder("/"), it results in illegal argument exception.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java 2012-01-27 18:28:47 UTC (rev 38248)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java 2012-01-27 19:36:09 UTC (rev 38249)
@@ -43,7 +43,7 @@
IPath path = ProjectHome.getFirstWebContentPath(project);
if(path != null)
- return project.getFolder(path.removeFirstSegments(1));
+ return path.segmentCount() > 1 ? project.getFolder(path.removeFirstSegments(1)) : project;
return null;
}
14 years, 2 months
JBoss Tools SVN: r38248 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-27 13:28:47 -0500 (Fri, 27 Jan 2012)
New Revision: 38248
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
Log:
fixed org.jboss.tools.seam.ui.test.jbide.JBide3989Test failure
https://issues.jboss.org/browse/JBIDE-10731
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2012-01-27 18:19:15 UTC (rev 38247)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2012-01-27 18:28:47 UTC (rev 38248)
@@ -50,8 +50,8 @@
TestProjectProvider provider = new TestProjectProvider(
"org.jboss.tools.seam.ui.test", null, PROJECT_NAME, makeCopy);
project = provider.getProject();
-// ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
-// seamProject.setRuntimeName("UNKNOWN");
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
+ seamProject.setRuntimeName("UNKNOWN");
ValidatorManager.addProjectBuildValidationSupport(project);
// JBIDE-4832 - call SeamProjectPropertyValidator manually
project.build(IncrementalProjectBuilder.FULL_BUILD,
14 years, 2 months
JBoss Tools SVN: r38247 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-27 13:19:15 -0500 (Fri, 27 Jan 2012)
New Revision: 38247
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
Log:
[JBIDE-10724] corrected javadoc in TreeUtils
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 18:16:53 UTC (rev 38246)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TreeUtils.java 2012-01-27 18:19:15 UTC (rev 38247)
@@ -13,7 +13,6 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.custom.TreeEditor;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
@@ -53,14 +52,14 @@
}
/**
- * Initializes a given table editor for a given viewer cell with a given (editor-)control.
+ * Initializes a given tree editor for a given viewer cell with a given (editor-)control.
*
- * @param treeEditor the table editor
- * @param control the control
- * @param cellText the cell text
- * @param cell the cell
+ * @param treeEditor the tree editor that shall get initialized
+ * @param control the control that shall be positioned by the tree editor
+ * @param cellText the text that will get displayed in the cell (only used to make sure, the cell has the required size)
+ * @param cell the cell the table editor shall be positioned to.
*
- * @see TableEditor
+ * @see TreeEditor
* @see ViewerCell
*/
public static void initializeTreeEditor( TreeEditor treeEditor, Control control, String cellText, ViewerCell cell )
14 years, 2 months