JBoss Tools SVN: r43657 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-09-13 11:58:29 -0400 (Thu, 13 Sep 2012)
New Revision: 43657
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java
Log:
JBIDE-12587
https://issues.jboss.org/browse/JBIDE-12587
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java 2012-09-13 15:45:41 UTC (rev 43656)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParameterDefinition.java 2012-09-13 15:58:29 UTC (rev 43657)
@@ -75,11 +75,4 @@
return variable;
}
- public String getAnnotationText(String annotationTypeName) {
- ITextSourceReference pos = getAnnotationPosition(annotationTypeName);
- if(pos == null) return null;
- String text = methodDefinition.getTypeDefinition().getContent().substring(pos.getStartPosition(), pos.getStartPosition() + pos.getLength());
- return text;
- }
-
}
\ No newline at end of file
13 years, 3 months
JBoss Tools SVN: r43656 - trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-09-13 11:45:41 -0400 (Thu, 13 Sep 2012)
New Revision: 43656
Modified:
trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml
Log:
osx jdk 1.7 property another test
Modified: trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml
===================================================================
--- trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml 2012-09-13 15:08:29 UTC (rev 43655)
+++ trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml 2012-09-13 15:45:41 UTC (rev 43656)
@@ -12,30 +12,27 @@
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
- <properties>
- <vendor-os>ok</vendor-os>
- </properties>
-
<profiles>
<profile>
<id>mvn-debug</id>
<properties>
- <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</systemProperties>
+ <systemProperties>-Xdebug
+ -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</systemProperties>
</properties>
</profile>
<profile>
<id>mac17</id>
<activation>
- <property>
- <name>vendor-os</name>
- <value>ok</value>
- </property>
+ <jdk>1.7</jdk>
+ <os>
+ <name>Mac OS X</name>
+ </os>
</activation>
<properties>
- <systemProperties>-Dawt.toolkit=sun.lwawt.macosx.LWCToolkit</systemProperties>
+ <systemProperties>-Dawt.toolkit=sun.lwawt.macosx.LWCToolkit</systemProperties>
</properties>
- </profile>
+ </profile>
</profiles>
<build>
@@ -87,7 +84,7 @@
</dependencies>
</configuration>
</plugin>
- <plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tychoVersion}</version>
@@ -129,6 +126,6 @@
</configuration>
</plugin>
</plugins>
-
+
</build>
</project>
13 years, 3 months
JBoss Tools SVN: r43655 - 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: 2012-09-13 11:08:29 -0400 (Thu, 13 Sep 2012)
New Revision: 43655
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java
Log:
[JBIDE-11912] implementing "Manage SSH Keys" dialog for OpenShift Explorer: added buttons
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-13 14:54:15 UTC (rev 43654)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java 2012-09-13 15:08:29 UTC (rev 43655)
@@ -34,6 +34,7 @@
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Table;
@@ -62,21 +63,36 @@
protected void doCreateControls(Composite parent, DataBindingContext dbc) {
GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(parent);
- Group embedGroup = new Group(parent, SWT.NONE);
- embedGroup.setText("SSH Public Keys");
+ 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(embedGroup);
+ .hint(200, 300).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(sshKeysGroup);
GridLayoutFactory.fillDefaults()
- .numColumns(3).margins(6, 6).applyTo(embedGroup);
+ .numColumns(2).margins(6, 6).applyTo(sshKeysGroup);
- Composite tableContainer = new Composite(embedGroup, SWT.NONE);
+ Composite tableContainer = new Composite(sshKeysGroup, SWT.NONE);
this.viewer = createTable(tableContainer);
GridDataFactory.fillDefaults()
- .span(3, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableContainer);
+ .span(1, 4).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableContainer);
ViewerSupport.bind(
viewer,
BeanProperties.list(ManageSSHKeysWizardPageModel.PROPERTY_SSH_KEYS).observe(pageModel),
BeanProperties.values(new String[]{"name", "keyType", "publicKey"}));
+
+ Button addButton = new Button(sshKeysGroup, SWT.PUSH);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.FILL).applyTo(addButton);
+ addButton.setText("Add Existing...");
+
+ Button newButton = new Button(sshKeysGroup, SWT.PUSH);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.FILL).applyTo(newButton);
+ newButton.setText("New...");
+
+ Button removeButton = new Button(sshKeysGroup, SWT.PUSH);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.FILL).applyTo(removeButton);
+ removeButton.setText("Remove...");
}
protected TableViewer createTable(Composite tableContainer) {
13 years, 3 months
JBoss Tools SVN: r43654 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: icons and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-09-13 10:54:15 -0400 (Thu, 13 Sep 2012)
New Revision: 43654
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/key-icon.png
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizard.java
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/ManageSSHKeysWizardPageModel.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
Log:
[JBIDE-11912] implementing "Manage SSH Keys" dialog for OpenShift Explorer
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/key-icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/key-icon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties 2012-09-13 14:47:06 UTC (rev 43653)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.properties 2012-09-13 14:54:15 UTC (rev 43654)
@@ -6,3 +6,5 @@
openshift.express.name=OpenShift Server
openshift.express.description=A server adapter for use with OpenShift Applications
openshift.express.runtime.name = OpenShift Server Runtime
+
+openshift.command.managekeys=Manage SSH Keys
\ No newline at end of file
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-09-13 14:47:06 UTC (rev 43653)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-09-13 14:54:15 UTC (rev 43654)
@@ -310,7 +310,8 @@
<viewer
viewerId="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView">
<popupMenu
- allowsPlatformContributions="false">
+ allowsPlatformContributions="true"
+ id="org.jboss.tools.openshift.express.ui.viewer.expressConsoleView.popup">
<insertionPoint
name="group.showIn"
separator="true">
@@ -679,4 +680,38 @@
</view>
</perspectiveExtension>
</extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.jboss.tools.openshift.express.ui.command.manageKeys"
+ name="%openshift.command.managekeys">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.jboss.tools.openshift.express.internal.ui.command.ManageSSHKeysHandler"
+ commandId="org.jboss.tools.openshift.express.ui.command.manageKeys">
+ <enabledWhen>
+ <with variable="selection">
+ <iterate ifEmpty="false" operator="or">
+ <instanceof
+ value="org.jboss.tools.openshift.express.internal.core.console.UserDelegate" />
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.jboss.tools.openshift.express.ui.viewer.expressConsoleView.popup?before=group.server">
+ <command
+ commandId="org.jboss.tools.openshift.express.ui.command.manageKeys"
+ icon="icons/key-icon.png"
+ id="org.jboss.tools.openshift.express.ui.command.manageKeys"
+ mnemonic="K">
+ </command>
+ </menuContribution>
+ </extension>
</plugin>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-09-13 14:47:06 UTC (rev 43653)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-09-13 14:54:15 UTC (rev 43654)
@@ -309,6 +309,10 @@
this.connected = connected;
}
+ public List<IOpenShiftSSHKey> getSSHKeys() {
+ return delegate.getSSHKeys();
+ }
+
public IOpenShiftSSHKey getSSHKeyByPublicKey(String publicKey) throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException {
return delegate.getSSHKeyByPublicKey(publicKey);
}
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java 2012-09-13 14:54:15 UTC (rev 43654)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.command;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+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.wizard.ManageSSHKeysWizard;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class ManageSSHKeysHandler extends AbstractHandler {
+
+ /**
+ * the command has been executed, so extract extract the needed information
+ * from the application context.
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedElement instanceof UserDelegate) {
+ UserDelegate user = (UserDelegate) selectedElement;
+ WizardUtils.openWizardDialog(new ManageSSHKeysWizard(user), HandlerUtil.getActiveShell(event));
+ }
+ }
+ return null;
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/command/ManageSSHKeysHandler.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizard.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizard.java 2012-09-13 14:54:15 UTC (rev 43654)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.wizard;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+
+/**
+ * @author André Dietisheim
+ */
+public class ManageSSHKeysWizard extends Wizard {
+
+ private UserDelegate user;
+
+ public ManageSSHKeysWizard(UserDelegate user) {
+ this.user = user;
+ setNeedsProgressMonitor(true);
+ }
+
+ @Override
+ public boolean performFinish() {
+ return true;
+ }
+
+ @Override
+ public void addPages() {
+ addPage(new ManageSSHKeysWizardPage(user, this));
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java 2012-09-13 14:54:15 UTC (rev 43654)
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * 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.openshift.express.internal.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.databinding.viewers.ViewerSupport;
+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.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Table;
+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 com.openshift.client.IEmbeddableCartridge;
+import com.openshift.client.IOpenShiftSSHKey;
+
+/**
+ * @author André Dietisheim
+ */
+public class ManageSSHKeysWizardPage extends AbstractOpenShiftWizardPage {
+
+ private ManageSSHKeysWizardPageModel pageModel;
+ private TableViewer viewer;
+
+ public ManageSSHKeysWizardPage(UserDelegate user, IWizard wizard) {
+ super("Manage SSH Keys", "Manage the SSH keys that are available to your OpenShift account",
+ "ManageSSHKeysPage", wizard);
+ this.pageModel = new ManageSSHKeysWizardPageModel(user);
+ }
+
+ @Override
+ protected void doCreateControls(Composite parent, DataBindingContext dbc) {
+ GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(parent);
+
+ Group embedGroup = new Group(parent, SWT.NONE);
+ embedGroup.setText("SSH Public Keys");
+ GridDataFactory.fillDefaults()
+ .hint(200, 300).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(embedGroup);
+ GridLayoutFactory.fillDefaults()
+ .numColumns(3).margins(6, 6).applyTo(embedGroup);
+
+ Composite tableContainer = new Composite(embedGroup, SWT.NONE);
+ this.viewer = createTable(tableContainer);
+ GridDataFactory.fillDefaults()
+ .span(3, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tableContainer);
+ ViewerSupport.bind(
+ viewer,
+ BeanProperties.list(ManageSSHKeysWizardPageModel.PROPERTY_SSH_KEYS).observe(pageModel),
+ BeanProperties.values(new String[]{"name", "keyType", "publicKey"}));
+ }
+
+ protected TableViewer createTable(Composite tableContainer) {
+ Table table =
+ new Table(tableContainer, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL);
+ table.setLinesVisible(true);
+ TableColumnLayout tableLayout = new TableColumnLayout();
+ tableContainer.setLayout(tableLayout);
+ TableViewer viewer = new TableViewer(table);
+ viewer.setComparer(new EqualityComparer());
+ viewer.setContentProvider(new ArrayContentProvider());
+
+ viewer.setSorter(new ViewerSorter() {
+
+ @Override
+ public int compare(Viewer viewer, Object thisKey, Object thatKey) {
+ if (thisKey instanceof IOpenShiftSSHKey
+ && thatKey instanceof IOpenShiftSSHKey) {
+ return ((IOpenShiftSSHKey) thisKey).getName().compareTo(((IEmbeddableCartridge) thatKey).getName());
+ }
+ return super.compare(viewer, thisKey, thatKey);
+ }
+
+ });
+
+ createTableColumn("Name", 1, new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ IOpenShiftSSHKey key = (IOpenShiftSSHKey) cell.getElement();
+ cell.setText(key.getName());
+ }
+ }, viewer, tableLayout);
+ createTableColumn("Type", 1, new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ IOpenShiftSSHKey key = (IOpenShiftSSHKey) cell.getElement();
+ cell.setText(key.getName());
+ }
+ }, viewer, tableLayout);
+ createTableColumn("Public Key", 1, new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ IOpenShiftSSHKey key = (IOpenShiftSSHKey) cell.getElement();
+ cell.setText(key.getPublicKey());
+ }
+ }, viewer, tableLayout);
+ return viewer;
+ }
+
+ private void createTableColumn(String name, int weight, CellLabelProvider cellLabelProvider, TableViewer viewer,
+ TableColumnLayout layout) {
+ TableViewerColumn column = new TableViewerColumn(viewer, SWT.LEFT);
+ column.getColumn().setText(name);
+ column.setLabelProvider(cellLabelProvider);
+ layout.setColumnData(column.getColumn(), new ColumnWeightData(weight, true));
+ }
+
+ @Override
+ protected void onPageActivated(DataBindingContext dbc) {
+ try {
+ WizardUtils.runInWizard(new Job("Loading ssh keys...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+// setViewerInput(pageModel.loadSSHKeys());
+ pageModel.loadSSHKeys();
+ return Status.OK_STATUS;
+ } catch (Exception e) {
+ clearViewer();
+ return OpenShiftUIActivator.createErrorStatus("Could not load ssh keys.", e);
+ }
+ }
+
+ }, getContainer(), getDataBindingContext());
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ private void clearViewer() {
+ setViewerInput(new ArrayList<IOpenShiftSSHKey>());
+ }
+
+ private void setViewerInput(final Collection<IOpenShiftSSHKey> keys) {
+ getShell().getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ viewer.setInput(keys);
+ }
+ });
+ }
+
+ /**
+ * 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
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPageModel.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPageModel.java 2012-09-13 14:54:15 UTC (rev 43654)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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.openshift.express.internal.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
+import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
+
+import com.openshift.client.IOpenShiftSSHKey;
+
+/**
+ * @author André Dietisheim
+ */
+public class ManageSSHKeysWizardPageModel extends ObservableUIPojo {
+
+ public static final String PROPERTY_SSH_KEYS = "sshKeys";
+
+ private UserDelegate user;
+ private List<IOpenShiftSSHKey> keys = new ArrayList<IOpenShiftSSHKey>();
+
+ public ManageSSHKeysWizardPageModel(UserDelegate user) {
+ this.user = user;
+ }
+
+ public List<IOpenShiftSSHKey> loadSSHKeys() {
+ return setSSHKeys(user.getSSHKeys());
+ }
+
+ public List<IOpenShiftSSHKey> getSSHKeys() {
+ return keys;
+ }
+
+ public List<IOpenShiftSSHKey> setSSHKeys(List<IOpenShiftSSHKey> keys) {
+ firePropertyChange(PROPERTY_SSH_KEYS, this.keys, this.keys = keys);
+ return this.keys;
+ }
+
+ public UserDelegate getUser() {
+ return user;
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ManageSSHKeysWizardPageModel.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r43653 - trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-09-13 10:47:06 -0400 (Thu, 13 Sep 2012)
New Revision: 43653
Modified:
trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml
Log:
osx jdk 1.7 property test
Modified: trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml
===================================================================
--- trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml 2012-09-13 14:35:35 UTC (rev 43652)
+++ trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/pom.xml 2012-09-13 14:47:06 UTC (rev 43653)
@@ -13,7 +13,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <vendor-os>${java.vendor.url}-${os.name}</vendor-os>
+ <vendor-os>ok</vendor-os>
</properties>
<profiles>
@@ -29,7 +29,7 @@
<activation>
<property>
<name>vendor-os</name>
- <value>http://java.oracle.com/-Mac OS X</value>
+ <value>ok</value>
</property>
</activation>
<properties>
13 years, 3 months
JBoss Tools SVN: r43652 - in trunk/documentation/whatsnew: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-09-13 10:35:35 -0400 (Thu, 13 Sep 2012)
New Revision: 43652
Added:
trunk/documentation/whatsnew/images/dependency_conversion.png
trunk/documentation/whatsnew/maven/maven-news-4.0.0.Alpha1.html
Modified:
trunk/documentation/whatsnew/index.html
Log:
Maven N&N for 4.0.0.Alpha1
Added: trunk/documentation/whatsnew/images/dependency_conversion.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/dependency_conversion.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2012-09-13 14:21:25 UTC (rev 43651)
+++ trunk/documentation/whatsnew/index.html 2012-09-13 14:35:35 UTC (rev 43652)
@@ -55,6 +55,8 @@
<p><a href="cdi/cdi-news-4.0.0.Alpha1.html">CDI Tools</a></p>
<p><a href="jst/jst-news-4.0.0.Alpha1.html">JST/JSF Tools</a></p>
+ <p><a href="maven/maven-news-4.0.0.Alpha1.html">Maven Tools</a></p>
+
</td>
</tr>
Added: trunk/documentation/whatsnew/maven/maven-news-4.0.0.Alpha1.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-4.0.0.Alpha1.html (rev 0)
+++ trunk/documentation/whatsnew/maven/maven-news-4.0.0.Alpha1.html 2012-09-13 14:35:35 UTC (rev 43652)
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>What's New in Maven Tools</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>Maven Tools</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+href="../jst/jst-news-4.0.0.Alpha1.html">JST/JSF ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>JBoss Maven Integration</h3>
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="m2e-wtp-migration" id="m2e-wtp-migration"></a><b>New m2e-wtp 0.16.0 (eclipse.org) requirement</b></td>
+ <td valign="top">
+ m2eclipse-wtp is moving to Eclipse.org as <a href="https://www.eclipse.org/m2e-wtp/">m2e-wtp</a>. As such the existing dependency on m2eclipse-wtp as been changed to <a href="http://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/0.16">m2e-wtp 0.16.0</a>.
+ Since the two plugins overlap and can not coexist, upgrading JBoss Tools is gonna be a bit trickier this time around :
+ <ul>
+ <li>If you added the JBoss Tools 4.0 update site to your list of Available Update Sites, doing "Help > Find Updates" should (after a looong time) find m2e-wtp as a suitable replacement for m2eclipse-wtp, and everything should update properly</li>
+ <li>If you try to update your JBoss Tools installation via "Help > Install New Software...", m2e-wtp won't install because of the conflict with m2eclipse-wtp (this is a bug in p2)</li>
+ <li>the safest path is to uninstall all previous Maven plugins/features or start from a fresh Eclipse installation</li>
+ </ul>
+
+ On a somewhat related note, we made sure our JBoss Tools Maven features are fully compatible with the new m2e 1.2 (Juno SR1).
+ </p>
+
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-12293">JBIDE-12293</a> for more details.
+
+ </small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="conversion" id="conversion"></a><b>Conversion of classpath entries to Maven dependencies</b></td>
+ <td valign="top">
+ <p>Converting a java project to Maven is not always an easy task. m2e 1.1 introduced a new API that could help improve that conversion process.
+ For instance, m2e and m2e-wtp can help you convert your Java (EE) eclipse project settings to their maven plugin configuration counterparts,
+ but so far converting Java dependencies has been a tedious manual chore.
+ </p>
+ <p>
+ In JBoss Tools 4.0, we've been toying with a new Classpath Dependency conversion mechanism, hooked to the maven conversion process aforementioned.
+ Select a legacy Eclipse Java project, right-click then "Configure > Convert to Maven ...". After selecting the project's maven coordinate,
+ a new Wizard will pop up, trying to identify all the project's classpath entries as their equivalent Maven dependencies :
+ </p>
+ <img src="../images/dependency_conversion.png" />
+
+<p> Here is how it works currently:
+ <ul>
+ <li>Upon display, the wizard spawns a bunch of identification requests in parallel</li>
+ <li>Identified dependencies are then resolved by Maven against the current settings.xml known repositories. If they don't resolve, a warning will be displayed</li>
+ <li>Unidentified dependencies appear with a red icon</li>
+ <li>Double-clicking on any Maven dependency will open a dialog page to edit the dependency's details (groupId, artifactId, version, scope ...).</li>
+ </ul>
+</p>
+<p>
+ The identification mechanism itself is based on a refactored version of our previous <a href="maven-news-3.3.0.Beta3.html"> Source Lookup feature</a> and tries several identification methods :
+ <ul>
+ <li>checks if the jar contains maven descriptors under META-INF/maven.</li>
+ <li>checks if the SHA1 checksum of the jar can be found in m2e's nexus indexes.</li>
+ <li>checks if the SHA1 checksum of the jar can be identified from one of the remote Nexus repository instances defined in Window > Preferences > JBoss Tools > Remote Repositories.</li>
+ </ul>
+</p>
+<p>
+ Once you click Finish, any selected dependencies will be added to the generated pom.xml. If you checked "Delete classpath entries from project",
+ all the project classpath entries will be removed from the eclipse classpath, as we expect the Maven Dependencies Library to provide all these dependencies.
+</p>
+
+ <p><strong>Be aware this is a very alpha quality work-in-progress</strong>.
+ For instance, UI freezes should be expected in this first iteration, caused by the Maven resolution part;
+ "In-progress" Identification status is not correclty reported.
+ </p>
+ <p>
+ You can contribute to improve that feature by testing and reporting bug / enhancement requests to JIRA, using the <i><a href="https://issues.jboss.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=l...">maven_conversion</a></i> label.
+ </p>
+<p>
+ As a final note, this conversion tool is made to help you kickstart your project migration to Maven, but won't solve all your problems :
+ <ul>
+ <li>the identification mechanism will not identify <strong>everything</strong> (for instance, jar that are "classifier" versions of an artifact can not be identified).</li>
+ <li>after all the dependencies have been added to your pom.xml, it's your responsibility to prune them from any unwanted transitive dependencies.</li>
+ </ul>
+</p>
+
+
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-8973">JBIDE-8973</a> for more details.
+ </small></p>
+ </td>
+ </tr>
+
+<tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+
+
+</table>
+
+</body>
+
+</html>
+
+
13 years, 3 months
JBoss Tools SVN: r43651 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-09-13 10:21:25 -0400 (Thu, 13 Sep 2012)
New Revision: 43651
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-12607 - Add button in Runtime Detection preference page doesn't work
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-09-13 14:18:02 UTC (rev 43650)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-09-13 14:21:25 UTC (rev 43651)
@@ -395,8 +395,11 @@
RuntimeUIActivator.launchSearchRuntimePathDialog(getShell(),
new RuntimePath[]{runtimePath}, true, 15);
configureSearch();
+ RuntimeUIActivator.getDefault().getModel().addRuntimePath(runtimePath);
+ runtimePaths = RuntimeUIActivator.getRuntimePaths();
runtimePathViewer.setInput(runtimePath.getRuntimeDefinitions());
runtimePathViewer.refresh();
+
}
private void removedPressed() {
13 years, 3 months
JBoss Tools SVN: r43650 - trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/META-INF.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-09-13 10:18:02 -0400 (Thu, 13 Sep 2012)
New Revision: 43650
Modified:
trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF
Log:
JBIDE-12606 - Seam Detector depends on as.detector plugin that has been removed
Modified: trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF 2012-09-13 14:08:21 UTC (rev 43649)
+++ trunk/seam/plugins/org.jboss.tools.runtime.seam.detector/META-INF/MANIFEST.MF 2012-09-13 14:18:02 UTC (rev 43650)
@@ -28,8 +28,7 @@
org.jboss.tools.seam.ui.pages,
org.jboss.tools.seam.xml,
org.jboss.tools.seam.xml.ui,
- org.jboss.tools.seam.text.ext,
- org.jboss.tools.runtime.as.detector
+ org.jboss.tools.seam.text.ext
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %BundleVendor
13 years, 3 months
JBoss Tools SVN: r43649 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-09-13 10:08:21 -0400 (Thu, 13 Sep 2012)
New Revision: 43649
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/JBossASHandler.java
Log:
JBIDE-12603 - Default fileset not added for first detected runtime
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/JBossASHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/JBossASHandler.java 2012-09-13 14:06:26 UTC (rev 43648)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/JBossASHandler.java 2012-09-13 14:08:21 UTC (rev 43649)
@@ -45,6 +45,7 @@
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimeDefinition;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
public class JBossASHandler extends AbstractRuntimeDetectorDelegate implements IJBossRuntimePluginConstants {
@@ -69,6 +70,17 @@
SERVER_DEFAULT_NAME.put(IJBossToolingConstants.SERVER_AS_70, Messages.JBossRuntimeStartup_JBoss_Application_Server_7_0);
SERVER_DEFAULT_NAME.put(IJBossToolingConstants.SERVER_AS_71, Messages.JBossRuntimeStartup_JBoss_Application_Server_7_1);
SERVER_DEFAULT_NAME.put(IJBossToolingConstants.SERVER_EAP_60, Messages.JBossRuntimeStartup_JBoss_EAP_Server_6_0);
+ Bundle bundle = Platform.getBundle("org.jboss.ide.eclipse.archives.webtools"); //$NON-NLS-1$
+ if (bundle != null) {
+ try {
+ if ((bundle.getState() & Bundle.INSTALLED) == 0) {
+ bundle.start(Bundle.START_ACTIVATION_POLICY);
+ bundle.start(Bundle.START_TRANSIENT);
+ }
+ } catch (BundleException e) {
+ // failed, try next bundle
+ }
+ }
}
public void initializeRuntimes(List<RuntimeDefinition> runtimeDefinitions) {
13 years, 3 months
JBoss Tools SVN: r43648 - trunk/build/target-platforms/local.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-09-13 10:06:26 -0400 (Thu, 13 Sep 2012)
New Revision: 43648
Removed:
trunk/build/target-platforms/local/contentXml2artifactVersions.xsl
trunk/build/target-platforms/local/target2targetTemplate.xsl
trunk/build/target-platforms/local/targetUpdateFromRepo.xml
Modified:
trunk/build/target-platforms/local/pom.xml
Log:
JBIDE-12565: Removed useless files, put default repo into target/REPO so it gets cleaned
Deleted: trunk/build/target-platforms/local/contentXml2artifactVersions.xsl
===================================================================
--- trunk/build/target-platforms/local/contentXml2artifactVersions.xsl 2012-09-13 13:08:51 UTC (rev 43647)
+++ trunk/build/target-platforms/local/contentXml2artifactVersions.xsl 2012-09-13 14:06:26 UTC (rev 43648)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<!--
- This XSLT is used by targetUpdateFromRepo.xml to update the versions on IUs in a .target file
- CAUTION: do not auto-format this file or line breaks will appear where they should not be!
--->
-<xsl:output method="text" indent="no" encoding="UTF-8" version="1.0" />
-<xsl:template match="repository">
-<xsl:apply-templates select="//unit" />
-</xsl:template>
-<xsl:template match="/"><xsl:for-each select="//unit">
-<xsl:sort select="@id" order="ascending" case-order="lower-first"/><xsl:sort select="@version" order="descending" case-order="lower-first" data-type="qname"/><xsl:value-of select="@id" />.version=<xsl:value-of select="@version" />
-<xsl:variable name="thisID" select="@id"/>
-<xsl:if test="count(//unit[@id = $thisID]) > 1">
-# Warning: <xsl:value-of select="count(//unit[@id = $thisID])"/> versions found for <xsl:value-of select="@id" />:<xsl:for-each select="//unit[@id = $thisID]"><xsl:sort select="@id" order="ascending" case-order="lower-first"/><xsl:sort select="@version" order="descending" case-order="lower-first" data-type="qname"/>
-# <xsl:value-of select="@id" />.version=<xsl:value-of select="@version" /></xsl:for-each></xsl:if>
-#
-</xsl:for-each></xsl:template>
-</xsl:stylesheet>
Modified: trunk/build/target-platforms/local/pom.xml
===================================================================
--- trunk/build/target-platforms/local/pom.xml 2012-09-13 13:08:51 UTC (rev 43647)
+++ trunk/build/target-platforms/local/pom.xml 2012-09-13 14:06:26 UTC (rev 43648)
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>target-platforms</artifactId>
+ <artifactId>target-platforms</artifactId>
<version>4.0.0.Alpha2-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.target-platforms</groupId>
@@ -13,7 +13,7 @@
<packaging>pom</packaging>
<properties>
- <repoDir>${basedir}/REPO</repoDir>
+ <repoDir>${project.build.directory}/REPO</repoDir>
<eclipse.type>platform</eclipse.type>
<!--
@@ -22,7 +22,7 @@
-->
<eclipse.version>M20120829-1000</eclipse.version>
<eclipse.URL>http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downl...</eclipse.URL>
-
+
<!-- Temporary before release of Tycho 0.16 -->
<!-- JBIDE-12003 -->
<tychoVersion>0.16.0-SNAPSHOT</tychoVersion>
@@ -99,7 +99,7 @@
<execution>
<phase>verify</phase>
<goals>
- <goal>validate-target-platform</goal>
+ <goal>validate-target-platform</goal>
</goals>
<configuration>
<targetFiles>
@@ -139,6 +139,9 @@
<profiles>
<profile>
<id>get.local.target</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
<build>
<plugins>
<plugin>
Deleted: trunk/build/target-platforms/local/target2targetTemplate.xsl
===================================================================
--- trunk/build/target-platforms/local/target2targetTemplate.xsl 2012-09-13 13:08:51 UTC (rev 43647)
+++ trunk/build/target-platforms/local/target2targetTemplate.xsl 2012-09-13 14:06:26 UTC (rev 43648)
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<!--
- This XSLT is used by targetUpdateFromRepo.xml to update the versions on IUs in a .target file
- CAUTION: do not auto-format this file or line breaks will appear where they should not be!
--->
-
-<xsl:param name="replacement.URL"/>
-<xsl:param name="replace.versions"/>
-
-<!-- Copy unit nodes and optionally (if we ran contentXml2artifactVersions.xsl transform and have artifactVersions.properties file) templatize their version attributes -->
-<xsl:template match="unit">
-<xsl:choose>
-<xsl:when test="$replace.versions">
-
-<xsl:variable name="prevID"><xsl:value-of select="preceding-sibling::* [1]/@id" /></xsl:variable> <!-- <prevID><xsl:value-of select="$prevID"/></prevID> -->
-<xsl:variable name="thisID"><xsl:value-of select="@id" /></xsl:variable> <!-- <thisID><xsl:value-of select="$thisID"/></thisID> -->
-<xsl:variable name="nextID"><xsl:value-of select="following-sibling::* [1]/@id" /></xsl:variable> <!-- <nextID><xsl:value-of select="$nextID"/></nextID> -->
-
-<!-- if there is more than one node matching <unit id="some.id"/> then DO NOT REPLACE the version -->
-<xsl:choose>
- <xsl:when test="contains ($thisID, $nextID) or contains ($thisID, $prevID)">
- <!-- <xsl:comment> Note multiple versions of this IU; cannot update automatically. </xsl:comment> -->
- <unit id="{@id}" version="{@version}"><xsl:apply-templates/></unit>
- </xsl:when>
- <xsl:otherwise>
- <unit id="{@id}" version="${{{(a)id}.version}}"><xsl:apply-templates/></unit>
- </xsl:otherwise>
-</xsl:choose>
-<xsl:apply-templates/>
-</xsl:when>
-<xsl:otherwise>
-<unit id="{@id}" version="{@version}"><xsl:apply-templates/></unit>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<!-- Copy repository nodes and optionally replace their location attributes (if replacement.URL is set) -->
-<xsl:template match="repository">
-<xsl:choose>
-<xsl:when test="$replacement.URL">
-<repository location="{$replacement.URL}">
-<xsl:apply-templates/>
-</repository>
-</xsl:when>
-<xsl:otherwise>
-<repository location="{@location}">
-<xsl:apply-templates/>
-</repository>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<!-- Copy everything else unchanged -->
-<xsl:template match="@*|node()">
-<xsl:copy>
-<xsl:apply-templates select="@*|node()"/>
-</xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
-
Deleted: trunk/build/target-platforms/local/targetUpdateFromRepo.xml
===================================================================
--- trunk/build/target-platforms/local/targetUpdateFromRepo.xml 2012-09-13 13:08:51 UTC (rev 43647)
+++ trunk/build/target-platforms/local/targetUpdateFromRepo.xml 2012-09-13 14:06:26 UTC (rev 43648)
@@ -1,165 +0,0 @@
-<project default="custom.build" name="jbosstools target platform updater">
-
- <property name="outputDir" value="${basedir}" />
- <!-- Instead of overwriting, can also create a new .target file in a different outputDir
- <property name="outputDir" value="${tmpDir}" />
- -->
-
- <!-- must set these commandline if not using defaults -->
- <property name="targetFile" value="multiple.target" />
- <property name="repoDir" value="${outputDir}/REPO/" />
-
- <!-- create a second .target file which replaces all URLs with a single unified (published) one
- (eg., for jbosstools target platform site), set these properties too -->
- <property name="unified.targetFile" value="unified.target" />
- <property name="unified.URL" value="http://download.jboss.org/jbosstools/updates/target-platform_4.0.juno.SR0..." />
- <property name="local.targetFile" value="local.target" />
- <property name="local.URL" value="file://${repoDir}" />
-
- <property name="tmpDir" value="${java.io.tmpdir}/targetUpdateFromRepo" />
-
- <target name="help">
- <echo>Must set these properties (or use defaults shown):
-
- ant -f targetUpdateFromRepo.xml -DrepoDir=${repoDir} \
- -DtargetFile=${targetFile} \
- -Dunified.targetFile=${unified.targetFile} \
- -Dunified.URL=${unified.URL} \
- -Dlocal.targetFile=${local.targetFile} \
- -Dlocal.URL=${local.URL}
-
-To simply generate a local.target file from the multiple.target file, use:
-
- ant -f targetUpdateFromRepo.xml local.target</echo>
- </target>
-
- <target name="custom.build" depends="check.content.xml, get.content.xml, copy.content.xml, contentXml2artifactVersions.xsl, multiple.target, unified.target, local.target, cleanup" />
-
- <target name="check.content.xml" description="if content.jar, unpack to get content.xml">
- <condition property="content.xml.exists" value="true">
- <available file="${repoDir}/content.xml" />
- </condition>
- </target>
- <target name="get.content.xml" unless="content.xml.exists">
- <echo level="verbose">Unzip ${tmpDir}/content.xml</echo>
- <unzip src="${repoDir}/content.jar" dest="${tmpDir}" />
- </target>
- <target name="copy.content.xml" if="content.xml.exists">
- <echo level="verbose">Copy ${tmpDir}/content.xml</echo>
- <copy file="${repoDir}/content.xml" todir="${tmpDir}" />
- </target>
-
- <target name="contentXml2artifactVersions.xsl">
- <echo level="verbose">Generate ${tmpDir}/artifactVersions.properties</echo>
- <xslt style="contentXml2artifactVersions.xsl" in="${tmpDir}/content.xml" out="${tmpDir}/artifactVersions.properties" processor="trax" />
- </target>
-
- <target name="target2targetTemplate" description="run target2targetTemplate.xsl to templatize .target file">
- <property name="outputFile" value="${tmpDir}/${targetFile}.template" />
- <property name="replacement.URL" value="" />
- <echo level="verbose">Generate ${outputFile}</echo>
- <xslt style="target2targetTemplate.xsl" in="${targetFile}" out="${outputFile}" processor="trax">
- <param name="replacement.URL" expression="${replacement.URL}" />
- <!-- if replace.versions is set, will update from versions in repo; if not set, will only update URLs, not IU versions -->
- <param name="replace.versions" expression="1" />
- </xslt>
- </target>
-
- <target name="multiple.target" description="update the multiple.target file based on new content in the local repo">
- <antcall target="target2targetTemplate" />
- <antcall target="updateTargetFile" />
- </target>
-
- <target name="unified.target" description="update the unified.target file based on new content in the local repo and replace URLs w/ single unified one">
- <antcall target="target2targetTemplate">
- <param name="outputFile" value="${tmpDir}/${unified.targetFile}.template" />
- <param name="replacement.URL" value="${unified.URL}" />
- </antcall>
- <antcall target="updateTargetFile">
- <param name="targetFile" value="${unified.targetFile}" />
- </antcall>
- </target>
-
- <target name="local.target" description="create a local.target file (based on new content in the local repo if available) and replace URLs w/ single local one">
- <antcall target="target2targetTemplate">
- <param name="outputFile" value="${tmpDir}/${local.targetFile}.template" />
- <param name="replacement.URL" value="${local.URL}" />
- </antcall>
- <antcall target="updateTargetFile">
- <param name="targetFile" value="${local.targetFile}" />
- </antcall>
- </target>
-
- <target name="updateTargetFile" description="load generated properties and resolve them in the template to create a new .target file">
- <property file="${tmpDir}/artifactVersions.properties" />
- <copy todir="${outputDir}" overwrite="true">
- <fileset file="${tmpDir}/${targetFile}.template" />
- <mapper type="merge" to="${targetFile}" />
- <filterchain>
- <expandproperties />
- </filterchain>
- </copy>
- </target>
-
- <target name="cleanup" description="purge temporary dir">
- <delete dir="${tmpDir}" includeemptydirs="true" quiet="true" />
- </target>
-
- <!-- test examples:
- cd ~/32x/build/target-platform
- ant -f targetUpdateFromRepo.xml test.updateTargetFile -Dtest.pattern=swtbot
- ant -f targetUpdateFromRepo.xml test.updateTargetFile -Dtest.pattern=js -DtargetFile=jbds.target -DrepoDir=`pwd`/JBDS_REPO/
- -->
- <target name="test.updateTargetFile" depends="check.content.xml, get.content.xml, copy.content.xml, contentXml2artifactVersions.xsl">
- <!-- properties to set commandline: -->
- <property name="test.pattern" value="swtbot"/>
- <property name="test.targetFile" value="${targetFile}"/>
-
- <property name="tmpfile" value="${tmpDir}/test.updateTargetFile.tmp"/>
- <property name="tmpfile2" value="${tmpDir}/test.updateTargetFile.tmpsed"/>
- <echo level="info">Load /${test.pattern}/ properties from ${tmpDir}/artifactVersions.properties</echo>
- <loadfile srcfile="${tmpDir}/artifactVersions.properties" property="artifactVersionsPropertiesContents">
- <filterchain>
- <linecontains>
- <contains value="${test.pattern}" />
- <!-- <contains value="feature.group" /> -->
- </linecontains>
- <striplinecomments><comment value="#"/></striplinecomments>
- </filterchain>
- </loadfile>
- <echo file="${tmpfile}">${artifactVersionsPropertiesContents}</echo>
-
- <antcall target="target2targetTemplate">
- <param name="outputFile" value="${tmpDir}/${test.targetFile}.template" />
- <param name="replacement.URL" value="${unified.URL}" />
- </antcall>
- <!-- <echo level="info">Generated ${tmpDir}/${unified.targetFile}.template: </echo>
- <exec executable="egrep">
- <arg line=""${test.pattern}" ${tmpDir}/${test.targetFile}.template" />
- </exec> -->
-
- <antcall target="updateTargetFile">
- <param name="targetFile" value="${test.targetFile}" />
- </antcall>
- <echo level="info">--
-If loaded version values (in artifactVersions.properties) do not match
-output below (values from repo), an error has occurred or replace.versions is undefined.
-It is also possible that the complete list of features in the repo is greater than those
-in the target. If so, clean the repo and regenerate to remove extraneous content.
---</echo>
- <!-- $ sed -n -e '/swtbot.*feature.group/ p' unified.target | sed -e 's/\t\t\t<unit id="\|"\/>//g' -->
- <exec executable="sed" output="${tmpfile2}">
- <arg line=" -n -e '/${test.pattern}.*feature.group/ p' ${test.targetFile}" />
- </exec>
- <exec executable="sed" output="${tmpfile}.2">
- <arg line=" -e 's/\t\t\t<unit id="\|"\/>//g' ${tmpfile2} -e 's/" version="/.version=/g'" />
- </exec>
- <exec executable="sort" output="${tmpfile}.sorted"><arg line="${tmpfile}"/></exec>
- <exec executable="sort" output="${tmpfile}.2.sorted"><arg line="${tmpfile}.2"/></exec>
- <exec executable="diff" outputproperty="diffout">
- <arg line="${tmpfile}.sorted ${tmpfile}.2.sorted"/>
- </exec>
- <echo>${diffout}</echo>
- <antcall target="cleanup"/>
- </target>
-</project>
13 years, 3 months