JBoss Tools SVN: r43727 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-09-15 04:46:35 -0400 (Sat, 15 Sep 2012)
New Revision: 43727
Modified:
trunk/build/aggregate/site/site.xml
Log:
JBIDE-12552: Added themes to site
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2012-09-15 00:08:24 UTC (rev 43726)
+++ trunk/build/aggregate/site/site.xml 2012-09-15 08:46:35 UTC (rev 43727)
@@ -4,7 +4,7 @@
<!-- PLEASE NOTE!
When updating this file, please be sure that it parses as valid XML before committing it.
- To test, just run `mvn clean install` in this folder.
+ To test, just run `mvn clean install` in this folder.
-->
<!-- only in JBDS
@@ -85,7 +85,7 @@
<category name="AbridgedTools" />
<category name="CloudTools" />
</feature>
- <!-- only in JBDS
+ <!-- only in JBDS
<feature url="features/org.eclipse.egit_0.0.0.jar" id="org.eclipse.egit" version="0.0.0">
</feature>
<feature url="features/org.eclipse.jgit_0.0.0.jar" id="org.eclipse.jgit" version="0.0.0">
@@ -173,7 +173,7 @@
<feature url="features/org.jboss.tools.maven.jpa.feature_0.0.0.jar" id="org.jboss.tools.maven.jpa.feature" version="0.0.0">
<category name="AbridgedTools" />
<category name="MavenTools" />
- </feature>
+ </feature>
<feature url="features/org.jboss.tools.maven.jsf.feature_0.0.0.jar" id="org.jboss.tools.maven.jsf.feature" version="0.0.0">
<category name="AbridgedTools" />
<category name="MavenTools" />
@@ -231,6 +231,9 @@
</feature>
<feature url="features/org.jboss.tools.common.verification.feature_0.0.0.jar" id="org.jboss.tools.common.verification.feature" version="0.0.0">
</feature>
+ <feature url="features/org.jboss.tools.central.themes.feature_0.0.0.jar" id="org.jboss.tools.central.themes.feature" version="0.0.0">
+ <!-- Categorize? -->
+ </feature>
<feature url="features/org.jboss.tools.runtime.core.feature_0.0.0.jar" id="org.jboss.tools.runtime.core.feature" version="0.0.0">
<category name="AbridgedTools" />
@@ -248,8 +251,8 @@
<category name="AbridgedTools" />
<category name="GeneralTools"/>
</feature>
-
-
+
+
<!-- ####### -->
<!-- SOURCES -->
<!-- ####### -->
@@ -367,7 +370,7 @@
</feature>
<feature url="features/org.jboss.tools.maven.jdt.feature.source_0.0.0.jar" id="org.jboss.tools.maven.jdt.feature.source" version="0.0.0">
<category name="AllSources" />
- </feature>
+ </feature>
<feature url="features/org.jboss.tools.maven.profiles.feature.source_0.0.0.jar" id="org.jboss.tools.maven.profiles.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
@@ -385,7 +388,7 @@
</feature>
<feature url="features/org.jboss.tools.usage.feature.source_0.0.0.jar" id="org.jboss.tools.usage.feature.source" version="0.0.0">
<category name="AllSources" />
- </feature>
+ </feature>
<!-- only in JBT and JBDS Extras -->
<feature url="features/org.jboss.tools.maven.jbosspackaging.feature.source_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature.source" version="0.0.0">
<category name="AllSources" />
@@ -419,7 +422,10 @@
<feature url="features/org.jboss.tools.common.verification.feature.source_0.0.0.jar" id="org.jboss.tools.common.verification.feature.source" version="0.0.0">
<category name="AllSources" />
</feature>
-
+ <feature url="features/org.jboss.tools.central.themes.feature.source_0.0.0.jar" id="org.jboss.tools.central.themes.feature.source" version="0.0.0">
+ <category name="AllSources" />
+ </feature>
+
<!-- ########## -->
<!-- CATEGORIES -->
<!-- ########## -->
@@ -449,7 +455,7 @@
<category-def name="ReportTools" label="JBoss Business Intelligence, Reporting and Charting">
<description>Business Intelligence, Reporting and Charting. Use these if you plan to integrate Hibernate or Seam with Eclipse BIRT.</description>
</category-def>
-
+
<category-def name="AllSources" label="Sources">
<description>Source code for JBoss Tools features.</description>
</category-def>
13 years, 4 months
JBoss Tools SVN: r43726 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-09-14 20:08:24 -0400 (Fri, 14 Sep 2012)
New Revision: 43726
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
JBIDE-12446
https://issues.jboss.org/browse/JBIDE-12446
Avoid keepeng reference to char[] when calling String.substring
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-09-15 00:07:14 UTC (rev 43725)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-09-15 00:08:24 UTC (rev 43726)
@@ -327,7 +327,8 @@
int offset = scaner.getTokenOffset();
String value = null;
try {
- value = document.get(offset, length);
+ //Value will be kept in EL model, so it has to be separated from long char[] in document.
+ value = "" + document.get(offset, length);
} catch (BadLocationException e) {
WebKbPlugin.getDefault().logError(e);
return null;
13 years, 4 months
JBoss Tools SVN: r43725 - in trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common: databinding and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 20:07:14 -0400 (Fri, 14 Sep 2012)
New Revision: 43725
Modified:
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/core/CommonCorePlugin.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/databinding/IObservablePojo.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/reporting/ProblemBuffer.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/INodeReference.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLEntityResolver.java
Log:
missing copyright comments were added
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/core/CommonCorePlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/core/CommonCorePlugin.java 2012-09-14 23:58:25 UTC (rev 43724)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/core/CommonCorePlugin.java 2012-09-15 00:07:14 UTC (rev 43725)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.common.core;
import java.io.File;
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/databinding/IObservablePojo.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/databinding/IObservablePojo.java 2012-09-14 23:58:25 UTC (rev 43724)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/databinding/IObservablePojo.java 2012-09-15 00:07:14 UTC (rev 43725)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.common.databinding;
import java.beans.PropertyChangeListener;
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/reporting/ProblemBuffer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2012-09-14 23:58:25 UTC (rev 43724)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2012-09-15 00:07:14 UTC (rev 43725)
@@ -15,11 +15,6 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.util.FileUtils;
import org.osgi.framework.Bundle;
-//import org.eclipse.core.internal.runtime.PlatformLogWriter;
-//import org.eclipse.core.runtime.ILogListener;
-//import org.eclipse.core.runtime.IStatus;
-//import org.eclipse.core.runtime.adaptor.EclipseLog;
-//import org.eclipse.osgi.framework.log.FrameworkLog;
/**
* This class is intended only to be called by Report Problem Framework.
@@ -29,17 +24,7 @@
ProblemBuffer() {}
- //TODO remove dead commented code.
/**
- * IProblemReporter implementation.
- * @param status
- */
-// public void writeToBuffer(IStatus status) {
-// getEclipseLog();
-// writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
-// }
-
- /**
* Returns number of entries in .log file.
* @return number of entries in .log file
*/
@@ -102,17 +87,6 @@
String reportText = sb.toString();
Submit.getInstance().submit(reportText, cleanBuffer);
}
-
-// FrameworkLog log;
-// ILogListener writer;
-
-// private FrameworkLog getEclipseLog() {
-// if(log == null) {
-// log = new EclipseLog(getLogFile());
-// writer = new PlatformLogWriter(log);
-// }
-// return log;
-// }
private File getLogFile() {
Bundle b = Platform.getBundle("org.jboss.tools.common"); //$NON-NLS-1$
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/INodeReference.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/INodeReference.java 2012-09-14 23:58:25 UTC (rev 43724)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/INodeReference.java 2012-09-15 00:07:14 UTC (rev 43725)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.common.text;
-
/**
* Represents a reference to XML node. For example there is
* <class>
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLEntityResolver.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2012-09-14 23:58:25 UTC (rev 43724)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2012-09-15 00:07:14 UTC (rev 43725)
@@ -1,9 +1,15 @@
-/*
- * XMLEntityResolver.java
- * Created on February 21, 2003, 9:38 AM
- */
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ **/
+package org.jboss.tools.common.xml;
-package org.jboss.tools.common.xml;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URL;
13 years, 4 months
JBoss Tools SVN: r43724 - in trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common: xml and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 19:58:25 -0400 (Fri, 14 Sep 2012)
New Revision: 43724
Modified:
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java
Log:
code cleanup in common.core plugin StringBuffer replaced with StringBuilder
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java 2012-09-14 23:23:24 UTC (rev 43723)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/text/TextProposal.java 2012-09-14 23:58:25 UTC (rev 43724)
@@ -132,7 +132,7 @@
public String getLabel() {
String l = label != null ? label : getReplacementString() == null ? "" : getReplacementString(); //$NON-NLS-1$
- StringBuffer dispLabel = new StringBuffer(l);
+ StringBuilder dispLabel = new StringBuilder(l);
if (type != null) {
dispLabel.append(" : "); //$NON-NLS-1$
dispLabel.append(type);
@@ -259,7 +259,7 @@
* @see java.lang.Object#toString()
*/
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append("label: "); //$NON-NLS-1$
buffer.append(label);
buffer.append("\ncontextInfo: "); //$NON-NLS-1$
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java 2012-09-14 23:23:24 UTC (rev 43723)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLUtilities.java 2012-09-14 23:58:25 UTC (rev 43724)
@@ -370,7 +370,7 @@
}
public static final String getCDATA(Element elem, boolean trim) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
NodeList nl = elem.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node nc = nl.item(i);
@@ -388,7 +388,7 @@
}
public static final String getComment(Element elem) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
Node node = elem.getPreviousSibling();
while (node != null) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
13 years, 4 months
JBoss Tools SVN: r43723 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-09-14 19:23:24 -0400 (Fri, 14 Sep 2012)
New Revision: 43723
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/StringUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TableViewerBuilder.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java
Log:
[JBIDE-11912] corrected various layout bugs, added refresh button
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/StringUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/StringUtils.java 2012-09-14 23:08:35 UTC (rev 43722)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/StringUtils.java 2012-09-14 23:23:24 UTC (rev 43723)
@@ -18,7 +18,8 @@
public class StringUtils {
private static final String LINE_SEPARATOR_KEY = "line.separator";
-
+ private static final String SHORTENING_MARKER = "...";
+
public static String null2emptyString(String value) {
if (value != null) {
return value;
@@ -85,4 +86,15 @@
return value == null
|| value.isEmpty();
}
+
+ public static String shorten(String text, int maxLength) {
+ if (text.length() < maxLength) {
+ return text;
+ }
+
+ return new StringBuilder(text.substring(0, maxLength - SHORTENING_MARKER.length()))
+ .append(SHORTENING_MARKER)
+ .toString();
+ }
+
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TableViewerBuilder.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TableViewerBuilder.java 2012-09-14 23:08:35 UTC (rev 43722)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/TableViewerBuilder.java 2012-09-14 23:23:24 UTC (rev 43723)
@@ -13,6 +13,7 @@
import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.CellLabelProvider;
import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IElementComparer;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
@@ -34,6 +35,7 @@
public TableViewerBuilder(TableViewer viewer, Composite tableContainer) {
this.viewer = viewer;
+ viewer.setComparer(new EqualityComparer());
this.tableLayout = new TableColumnLayout();
tableContainer.setLayout(tableLayout);
}
@@ -43,10 +45,19 @@
return this;
}
- public <V> ColumnBuilder<V> column(ICellValueProvider<V> valueProvider) {
- return new ColumnBuilder<V>(valueProvider);
+ public TableViewerBuilder comparer(IElementComparer sorter) {
+ viewer.setComparer(sorter);
+ return this;
}
+ public <E>ColumnBuilder<E> column(String name) {
+ return new ColumnBuilder<E>().name(name);
+ }
+
+ public <E>ColumnBuilder<E> column(IColumnLabelProvider<E> columnLabelProvider) {
+ return new ColumnBuilder<E>().labelProvider(columnLabelProvider);
+ }
+
public TableViewer buildViewer() {
return viewer;
}
@@ -54,13 +65,18 @@
public class ColumnBuilder<E> {
private int alignement;
- private ICellValueProvider<E> cellValueProvider;
+ private IColumnLabelProvider<E> columnLabelProvider;
private String name;
private int weight;
+ private int minWidth = ColumnWeightData.MINIMUM_WIDTH;
- private ColumnBuilder(ICellValueProvider<E> valueProvider) {
- this.cellValueProvider = valueProvider;
+ private ColumnBuilder() {
}
+
+ public ColumnBuilder<E> labelProvider(IColumnLabelProvider<E> labelProvider) {
+ this.columnLabelProvider = labelProvider;
+ return this;
+ }
public ColumnBuilder<E> align(int alignement) {
this.alignement = alignement;
@@ -77,6 +93,11 @@
return this;
}
+ public ColumnBuilder<E> minWidth(int minWidth) {
+ this.minWidth = minWidth;
+ return this;
+ }
+
public TableViewerBuilder buildColumn() {
TableViewerColumn column = new TableViewerColumn(viewer, alignement);
column.getColumn().setText(name);
@@ -85,17 +106,46 @@
@Override
public void update(ViewerCell cell) {
@SuppressWarnings("unchecked")
- String cellValue = cellValueProvider.getValue((E) cell.getElement());
+ String cellValue = columnLabelProvider.getValue((E) cell.getElement());
cell.setText(cellValue);
}
});
- tableLayout.setColumnData(column.getColumn(), new ColumnWeightData(weight, true));
+ tableLayout.setColumnData(column.getColumn(), new ColumnWeightData(weight, minWidth, true));
return TableViewerBuilder.this;
}
}
- public static interface ICellValueProvider<E> {
+ public static interface IColumnLabelProvider<E> {
public String getValue(E e);
}
-
+
+ /**
+ * Viewer element comparer based on #equals(). The default implementation in
+ * CheckboxTableViewer compares elements based on instance identity.
+ * <p>
+ * We need this since the available cartridges (item listed in the viewer)
+ * are not the same instance as the ones in the embedded application (items
+ * to check in the viewer).
+ */
+ public static class EqualityComparer implements IElementComparer {
+
+ @Override
+ public boolean equals(Object thisObject, Object thatObject) {
+ if (thisObject == null) {
+ return thatObject != null;
+ }
+
+ if (thatObject == null) {
+ return false;
+ }
+
+ return thisObject.equals(thatObject);
+ }
+
+ @Override
+ public int hashCode(Object element) {
+ return element.hashCode();
+ }
+ }
+
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java 2012-09-14 23:08:35 UTC (rev 43722)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java 2012-09-14 23:23:24 UTC (rev 43723)
@@ -20,13 +20,9 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.CellLabelProvider;
-import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.IElementComparer;
import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
@@ -36,8 +32,9 @@
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
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.utils.TableViewerBuilder;
-import org.jboss.tools.openshift.express.internal.ui.utils.TableViewerBuilder.ICellValueProvider;
+import org.jboss.tools.openshift.express.internal.ui.utils.TableViewerBuilder.IColumnLabelProvider;
import com.openshift.client.IOpenShiftSSHKey;
@@ -62,15 +59,15 @@
Group sshKeysGroup = new Group(parent, SWT.NONE);
sshKeysGroup.setText("SSH Public Keys");
GridDataFactory.fillDefaults()
- .hint(200, 300).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(sshKeysGroup);
+ .align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(sshKeysGroup);
GridLayoutFactory.fillDefaults()
.numColumns(2).margins(6, 6).applyTo(sshKeysGroup);
Composite tableContainer = new Composite(sshKeysGroup, SWT.NONE);
this.viewer = createTable(tableContainer);
GridDataFactory.fillDefaults()
- .span(1, 4).align(SWT.FILL, SWT.FILL).hint(500, 260).applyTo(tableContainer);
-
+ .span(1, 5).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableContainer);
+
Button addButton = new Button(sshKeysGroup, SWT.PUSH);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.FILL).applyTo(addButton);
@@ -85,50 +82,50 @@
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.FILL).applyTo(removeButton);
removeButton.setText("Remove...");
- }
+ Composite filler = new Composite(sshKeysGroup, SWT.None);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.FILL).applyTo(filler);
+
+ Button refreshButton = new Button(sshKeysGroup, SWT.PUSH);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.END).applyTo(refreshButton);
+ refreshButton.setText("Refresh...");
+}
+
protected TableViewer createTable(Composite tableContainer) {
Table table =
new Table(tableContainer, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
table.setLinesVisible(true);
table.setHeaderVisible(true);
this.viewer = new TableViewerBuilder(table, tableContainer)
- .contentProvider(new ArrayContentProvider())
- .column(new ICellValueProvider<IOpenShiftSSHKey>() {
+ .contentProvider(new ArrayContentProvider())
+ .column(new IColumnLabelProvider<IOpenShiftSSHKey>() {
- @Override
- public String getValue(IOpenShiftSSHKey key) {
- return key.getName();
- }
- })
- .name("Name")
- .align(SWT.LEFT)
- .weight(2)
- .buildColumn()
- .column(new ICellValueProvider<IOpenShiftSSHKey>() {
+ @Override
+ public String getValue(IOpenShiftSSHKey key) {
+ return key.getName();
+ }
+ })
+ .name("Name").align(SWT.LEFT).weight(2).minWidth(200).buildColumn()
+ .column(new IColumnLabelProvider<IOpenShiftSSHKey>() {
- @Override
- public String getValue(IOpenShiftSSHKey key) {
- return key.getKeyType().getTypeId();
- }
- })
- .name("Type")
- .align(SWT.LEFT)
- .weight(1)
- .buildColumn()
- .column(new ICellValueProvider<IOpenShiftSSHKey>() {
+ @Override
+ public String getValue(IOpenShiftSSHKey key) {
+ return key.getKeyType().getTypeId();
+ }
+ })
+ .name("Type").align(SWT.LEFT).weight(1).minWidth(50).buildColumn()
+ .column(new IColumnLabelProvider<IOpenShiftSSHKey>() {
- @Override
- public String getValue(IOpenShiftSSHKey key) {
- return key.getPublicKey();
- }
- })
- .name("Type")
- .align(SWT.LEFT)
- .weight(4)
- .buildColumn()
- .buildViewer();
-
+ @Override
+ public String getValue(IOpenShiftSSHKey key) {
+ return StringUtils.shorten(key.getPublicKey(), 24);
+ }
+ })
+ .name("Type").align(SWT.LEFT).weight(4).minWidth(100).buildColumn()
+ .buildViewer();
+
return viewer;
}
@@ -168,33 +165,4 @@
}
});
}
-
- /**
- * Viewer element comparer based on #equals(). The default implementation in
- * CheckboxTableViewer compares elements based on instance identity.
- * <p>
- * We need this since the available cartridges (item listed in the viewer)
- * are not the same instance as the ones in the embedded application (items
- * to check in the viewer).
- */
- private static class EqualityComparer implements IElementComparer {
-
- @Override
- public boolean equals(Object thisObject, Object thatObject) {
- if (thisObject == null) {
- return thatObject != null;
- }
-
- if (thatObject == null) {
- return false;
- }
-
- return thisObject.equals(thatObject);
- }
-
- @Override
- public int hashCode(Object element) {
- return element.hashCode();
- }
- }
}
\ No newline at end of file
13 years, 4 months
JBoss Tools SVN: r43722 - trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 19:08:35 -0400 (Fri, 14 Sep 2012)
New Revision: 43722
Modified:
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/StringUtil.java
Log:
Java doc added for common StringUtil.java class
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/StringUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/StringUtil.java 2012-09-14 22:58:24 UTC (rev 43721)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/StringUtil.java 2012-09-14 23:08:35 UTC (rev 43722)
@@ -24,23 +24,23 @@
/**
* Cuts of the starting and ending quotes from a given text value
*
- * @param Quoted
- * text value
- * @return Non-quoted text value
+ * @param <code>text</code> - text to be trimmed
+ * @return trimmed version of <code>text</code>
+ * @throws <code>NullPointerException</code> - if <code>text</code> parameter is <code>null</code>
*/
- public static String trimQuotes(String result) {
- String temp = result;
+ public static String trimQuotes(String text) {
+ String temp = text;
if(!temp.isEmpty()) {
- int start = 0, end = result.length();
- char first = result.charAt(start);
- char last = result.charAt(end - 1);
+ int start = 0, end = text.length();
+ final char first = text.charAt(start);
+ final char last = text.charAt(end - 1);
if (first == APO || first == QUOT) {
start++;
}
if ((last == APO || last == QUOT) && end>1) {
end--;
}
- temp = result.substring(start, end);
+ temp = text.substring(start, end);
}
return temp;
}
13 years, 4 months
JBoss Tools SVN: r43721 - trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 18:58:24 -0400 (Fri, 14 Sep 2012)
New Revision: 43721
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
Log:
Java doc added for common StringUtil.java class
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java 2012-09-14 22:43:09 UTC (rev 43720)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/ca/ELProposalProcessor.java 2012-09-14 22:58:24 UTC (rev 43721)
@@ -493,9 +493,6 @@
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- if(viewer == null) {
- return NO_PROPOSALS;
- }
IDocument document = viewer.getDocument();
int start = 0;
int end = document.getLength();
@@ -665,9 +662,7 @@
Arrays.sort(resultArray, new Comparator<ICompletionProposal>() {
public int compare(ICompletionProposal arg0,
ICompletionProposal arg1) {
- String str0 = (arg0 == null ? "" : arg0.getDisplayString()); //$NON-NLS-1$
- String str1 = (arg1 == null ? "" : arg1.getDisplayString()); //$NON-NLS-1$
- return str0.compareTo(str1);
+ return arg0.getDisplayString().compareTo(arg1.getDisplayString());
}
});
return resultArray;
13 years, 4 months
JBoss Tools SVN: r43720 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 18:43:09 -0400 (Fri, 14 Sep 2012)
New Revision: 43720
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/JavaProjectPropertyTester.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-12625 Knowledge-base content assist proposals list is shown even when there is no knowledge-base feature enabled for the project
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2012-09-14 20:50:49 UTC (rev 43719)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2012-09-14 22:43:09 UTC (rev 43720)
@@ -28,7 +28,8 @@
org.jboss.tools.common.ui,
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200",
org.eclipse.jst.j2ee;bundle-version="1.1.500",
- org.jboss.tools.common.validation
+ org.jboss.tools.common.validation,
+ org.eclipse.core.expressions;bundle-version="3.4.400"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %providerName
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2012-09-14 20:50:49 UTC (rev 43719)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/plugin.xml 2012-09-14 22:43:09 UTC (rev 43720)
@@ -220,7 +220,16 @@
<extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
id="kb_el_proposals"
name="KB EL Proposals">
- <proposalCategory icon="$nl$/icons/ca/el.png"/>
+ <proposalCategory
+ icon="$nl$/icons/ca/el.png">
+ <enablement>
+ <test
+ forcePluginActivation="false"
+ property="org.eclipse.core.resources.projectNature"
+ value="org.jboss.tools.jst.web.kb.kbnature">
+ </test>
+ </enablement>
+ </proposalCategory>
</extension>
<extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer"
@@ -333,5 +342,15 @@
nature="org.eclipse.jdt.core.javanature">
</queryParticipant>
</extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.jboss.tools.jst.web.kb.JavaProjectPropertyTester"
+ id="org.jboss.tools.jst.web.kb.propertyTester2"
+ namespace="org.eclipse.core.resources"
+ properties="projectNature"
+ type="org.eclipse.jdt.core.IJavaProject">
+ </propertyTester>
+ </extension>
</plugin>
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/JavaProjectPropertyTester.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/JavaProjectPropertyTester.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/JavaProjectPropertyTester.java 2012-09-14 22:43:09 UTC (rev 43720)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaProject;
+
+public class JavaProjectPropertyTester extends PropertyTester {
+
+ public JavaProjectPropertyTester() {
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ IJavaProject prj = (IJavaProject)receiver;
+ boolean result = false;
+ IProject eclproj = prj.getProject();
+ try {
+ if(eclproj.isAccessible()) {
+ result = eclproj.hasNature(expectedValue.toString());
+ }
+ } catch (CoreException e) {
+ WebKbPlugin.getDefault().logError(e);
+ }
+ return result;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/JavaProjectPropertyTester.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r43719 - in trunk/examples: tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-09-14 16:50:49 -0400 (Fri, 14 Sep 2012)
New Revision: 43719
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java
Log:
JBIDE-12624 - Test failures in org.jboss.tools.project.examples.test
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-09-14 20:15:37 UTC (rev 43718)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-09-14 20:50:49 UTC (rev 43719)
@@ -370,7 +370,7 @@
public IImportProjectExample getImportProjectExample(String importType) {
initImportProjectExamples();
- if (importType == null) {
+ if (importType == null || ProjectExample.IMPORT_TYPE_ZIP.equals(importType)) {
return defaultImportProjectExample;
}
return importProjectExamplesMap.get(importType);
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java 2012-09-14 20:15:37 UTC (rev 43718)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/ProjectExamplesUtil.java 2012-09-14 20:50:49 UTC (rev 43719)
@@ -59,7 +59,7 @@
*/
public class ProjectExamplesUtil {
- public static final int IDLE_TIME = 60000;
+ public static final int IDLE_TIME = 60 * 1000;
public static final String CONNECTION_PROFILE_NAME = "DefaultDS";
13 years, 4 months
JBoss Tools SVN: r43718 - trunk/central/features/org.jboss.tools.community.central.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-09-14 16:15:37 -0400 (Fri, 14 Sep 2012)
New Revision: 43718
Modified:
trunk/central/features/org.jboss.tools.community.central.feature/feature.xml
Log:
as.detrctor reference removed from community central feature to fix build error
Modified: trunk/central/features/org.jboss.tools.community.central.feature/feature.xml
===================================================================
--- trunk/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-09-14 19:42:51 UTC (rev 43717)
+++ trunk/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-09-14 20:15:37 UTC (rev 43718)
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<feature id="org.jboss.tools.community.central.feature" label="%featureName" version="1.1.0.qualifier" provider-name="%providerName" plugin="org.jboss.tools.community.central">
+<feature
+ id="org.jboss.tools.community.central.feature"
+ label="%featureName"
+ version="1.1.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.community.central">
+
<description>
%description
</description>
@@ -14,19 +20,13 @@
<requires>
<import feature="org.jboss.tools.central.feature" version="1.1.0" match="greaterOrEqual"/>
- <!-- JBIDE-11299 - include Examples features when installing Central -->
<import feature="org.jboss.tools.project.examples.feature" version="1.4.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.community.project.examples.feature" version="1.4.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.maven.project.examples.feature" version="1.4.0" match="greaterOrEqual"/>
- <!-- JBIDE-10803 - include AS, Seam, Runtime features when installing Central -->
<import feature="org.jboss.ide.eclipse.as.feature" version="2.4.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.seam.feature" version="3.4.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.runtime.core.feature" version="2.0.0" match="greaterOrEqual"/>
- <import feature="org.jboss.tools.runtime.as.detector.feature" version="2.4.0" match="greaterOrEqual"/>
<import feature="org.jboss.tools.runtime.seam.detector.feature" version="3.4.0" match="greaterOrEqual"/>
</requires>
- <!-- JBIDE-11299 remove unneeded plugin, but keep this feature around for ease-of-use when installing Central into Eclipse
- <plugin id="org.jboss.tools.community.central" download-size="0" install-size="0" version="0.0.0"/> -->
-
</feature>
13 years, 4 months