From: Mathieu Baudier Date: Fri, 9 Jan 2015 16:00:01 +0000 (+0000) Subject: Move RCP related devs to a dedicated source repository X-Git-Tag: argeo-commons-2.1.30~459 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=94639faebab4cad06d8c8845a530f3fcdc36ca5c;p=lgpl%2Fargeo-commons.git Move RCP related devs to a dedicated source repository git-svn-id: https://svn.argeo.org/commons/trunk@7652 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/dep/org.argeo.eclipse.dep.rcp/pom.xml b/dep/org.argeo.eclipse.dep.rcp/pom.xml deleted file mode 100644 index fbecafe76..000000000 --- a/dep/org.argeo.eclipse.dep.rcp/pom.xml +++ /dev/null @@ -1,307 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - dep - 2.1.12-SNAPSHOT - .. - - org.argeo.eclipse.dep.rcp - Eclipse RCP Dependencies - pom - - - - - - - - - org.argeo.tp.rcp.platform - binaries - ${version.eclipseIde} - pom - - - - org.argeo.tp.rap.platform - org.eclipse.osgi - - - org.argeo.tp.rap.platform - org.eclipse.osgi.services - - - - - org.argeo.tp.rcp.platform - org.eclipse.update.configurator - - - - org.argeo.tp.rcp.platform - org.eclipse.swt.win32.win32.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.carbon.macosx - - - org.argeo.tp.rcp.platform - org.eclipse.swt.cocoa.macosx.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.solaris.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.s390 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.s390x - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.linux.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.photon.qnx.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.hpux.ia64_32 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.hpux.ia64_32 - - - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.win32.win32.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.carbon.macosx - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.cocoa.macosx.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.solaris.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.s390 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.s390x - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.linux.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.photon.qnx.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.hpux.ia64_32 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.hpux.ia64_32 - - - - - org.argeo.tp.rcp.platform - org.eclipse.ui.carbon - - - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.runtime - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.shell - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.command - - - org.argeo.tp.rap.platform - org.eclipse.equinox.console - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - check-osgi - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - check-osgi - test - - equinox - - - true - - - - - - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/bnd.bnd b/dep/org.argeo.security.dep.node.rcp/bnd.bnd deleted file mode 100644 index e69de29bb..000000000 diff --git a/dep/org.argeo.security.dep.node.rcp/p2.inf b/dep/org.argeo.security.dep.node.rcp/p2.inf deleted file mode 100644 index 0423aa509..000000000 --- a/dep/org.argeo.security.dep.node.rcp/p2.inf +++ /dev/null @@ -1,2 +0,0 @@ -properties.1.name=org.eclipse.equinox.p2.type.category -properties.1.value=true \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/pom.xml b/dep/org.argeo.security.dep.node.rcp/pom.xml deleted file mode 100644 index 4650d17f0..000000000 --- a/dep/org.argeo.security.dep.node.rcp/pom.xml +++ /dev/null @@ -1,169 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - dep - .. - - org.argeo.security.dep.node.rcp - Node Eclipse RCP - - - - org.apache.felix - maven-bundle-plugin - - - default - - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - generate-descriptors - - descriptors - - generate-resources - - - - - - - - - org.argeo.commons - org.argeo.eclipse.ui.workbench - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.security.ui.admin - 2.1.12-SNAPSHOT - - - - - org.argeo.commons - org.argeo.eclipse.ui - 2.1.12-SNAPSHOT - - - - - org.argeo.commons - org.argeo.security.ui.rcp - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.security.equinox - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.security.ui - 2.1.12-SNAPSHOT - - - - org.argeo.commons - org.argeo.security.dep.node - 2.1.12-SNAPSHOT - pom - - - - - org.argeo.commons - org.argeo.eclipse.dep.rcp - 2.1.12-SNAPSHOT - pom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rpmbuild - - - - org.codehaus.mojo - rpm-maven-plugin - - - - - rpm-node-rcp - package - - rpm - - - argeo-node-rcp - - - /usr/share/osgi/rcp - root - root - 644 - false - - - org.argeo.commons:org.argeo.eclipse.ui.rcp - org.argeo.commons:org.argeo.security.ui.rcp - - - - - - argeo-node - argeo-node-eclipse - eclipse-platform - - - - - - - - - - diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml deleted file mode 100644 index 0b321cdca..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - linux.x86 - argeo-node-ui - - tar.gz - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:jar - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml deleted file mode 100644 index 12a0a3278..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - linux.x86_64 - argeo-node-ui - - tar.gz - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml deleted file mode 100644 index 15cec0da6..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - win32.x86 - argeo-node-ui - - zip - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.win32.win32.x86:jar - - - - \ No newline at end of file diff --git a/dep/pom.xml b/dep/pom.xml index 1ab8a834c..4a3f0eba1 100644 --- a/dep/pom.xml +++ b/dep/pom.xml @@ -14,15 +14,13 @@ - - org.argeo.eclipse.dep.rcp + org.argeo.security.dep.node - org.argeo.eclipse.dep.rwt - org.argeo.security.dep.node.rap - org.argeo.security.dep.node.rcp - + org.argeo.eclipse.dep.rwt + org.argeo.security.dep.node.rap + diff --git a/org.argeo.eclipse.ui.rcp/.classpath b/org.argeo.eclipse.ui.rcp/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.eclipse.ui.rcp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.eclipse.ui.rcp/.project b/org.argeo.eclipse.ui.rcp/.project deleted file mode 100644 index ef2dc2dbb..000000000 --- a/org.argeo.eclipse.ui.rcp/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.eclipse.ui.rcp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.argeo.eclipse.ui.rcp/bnd.bnd b/org.argeo.eclipse.ui.rcp/bnd.bnd deleted file mode 100644 index 4fd32e8c8..000000000 --- a/org.argeo.eclipse.ui.rcp/bnd.bnd +++ /dev/null @@ -1,18 +0,0 @@ -Require-Bundle: org.eclipse.ui,\ - org.eclipse.core.runtime -Import-Package: org.apache.commons.io,\ - org.argeo,\ - org.eclipse.core.commands,\ - org.eclipse.swt.widgets;version="[0,4.0)",\ - org.springframework.beans.factory,\ - org.springframework.core.io.support,\ - !org.eclipse.core.runtime,\ - !org.eclipse.ui.plugin,\ - * - - -# Was !org.eclipse.core.commands,\ why ? - -#Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin -#Bundle-ActivationPolicy: lazy -#Ignore-Package: org.eclipse.core.commands \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/build.properties b/org.argeo.eclipse.ui.rcp/build.properties deleted file mode 100644 index fd806ca05..000000000 --- a/org.argeo.eclipse.ui.rcp/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -source.. = src/ -output.. = bin/ diff --git a/org.argeo.eclipse.ui.rcp/pom.xml b/org.argeo.eclipse.ui.rcp/pom.xml deleted file mode 100644 index 280496761..000000000 --- a/org.argeo.eclipse.ui.rcp/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.eclipse.ui.rcp - Commons Eclipse UI RCP - Provide RCP specific classes and behaviour in order to enable single sourcing - jar - - - - - org.argeo.commons - org.argeo.eclipse.ui - 2.1.12-SNAPSHOT - - - - - org.argeo.commons - org.argeo.eclipse.dep.rcp - pom - 2.1.12-SNAPSHOT - - - - - - - - - org.argeo.commons - org.argeo.util - 2.1.12-SNAPSHOT - - - - - - - \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java deleted file mode 100644 index 71a0c898d..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import org.eclipse.osgi.util.NLS; - -/** RCP specific {@link NLS} to be extended */ -public class DefaultNLS extends NLS { - public final static String DEFAULT_BUNDLE_LOCATION = "/properties/plugin"; - - public DefaultNLS() { - this(DEFAULT_BUNDLE_LOCATION); - } - - public DefaultNLS(String bundleName) { - NLS.initializeMessages(bundleName, getClass()); - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java deleted file mode 100644 index 2642a35a1..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import org.eclipse.jface.viewers.ColumnViewer; -import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; -import org.eclipse.jface.viewers.Viewer; - -/** Static utilities to bridge differences between RCP and RAP */ -public class EclipseUiSpecificUtils { - /** - * TootlTip support is supported for {@link ColumnViewer} in RCP - * - * @see ColumnViewerToolTipSupport#enableFor(Viewer) - */ - public static void enableToolTipSupport(Viewer viewer) { - if (viewer instanceof ColumnViewer) - ColumnViewerToolTipSupport.enableFor((ColumnViewer) viewer); - } - - private EclipseUiSpecificUtils() { - } - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java deleted file mode 100644 index 5da49736d..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.awt.Desktop; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.apache.commons.io.IOUtils; -import org.argeo.ArgeoException; - -/** - * Abstraction that enable to implement runtime environment specific (typically - * RCP or RAP) methods while dealing with files in the UI. - * - */ -public class FileHandler { - - private FileProvider provider; - - public FileHandler(FileProvider provider) { - this.provider = provider; - } - - public void openFile(String fileName, String fileId) { - String tmpFileName = fileName; - String prefix = "", extension = ""; - if (fileName != null) { - int ind = fileName.lastIndexOf('.'); - if (ind > 0) { - prefix = fileName.substring(0, ind); - extension = fileName.substring(ind); - } - } - - InputStream is = null; - try { - is = provider.getInputStreamFromFileId(fileId); - File file = createTmpFile(prefix, extension, is); - tmpFileName = file.getName(); - Desktop desktop = null; - if (Desktop.isDesktopSupported()) { - desktop = Desktop.getDesktop(); - } - desktop.open(file); - } catch (IOException e) { - // Note : tmpFileName = fileName if the error has been thrown while - // creating the tmpFile. - throw new ArgeoException("Cannot open file " + tmpFileName, e); - } finally { - IOUtils.closeQuietly(is); - } - } - - private File createTmpFile(String prefix, String suffix, InputStream is) { - File tmpFile = null; - OutputStream os = null; - try { - tmpFile = File.createTempFile(prefix, suffix); - os = new FileOutputStream(tmpFile); - IOUtils.copy(is, os); - } catch (IOException e) { - throw new ArgeoException("Cannot open file " + prefix + "." - + suffix, e); - } finally { - IOUtils.closeQuietly(os); - } - return tmpFile; - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java deleted file mode 100644 index 5c92260d7..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -/** - * Used for file download : subclasses must implement model specific methods to - * get a byte array representing a file given is ID. - * - * @author bsinou - * - */ -public interface FileProvider { - - public byte[] getByteArrayFileFromId(String fileId); - - public InputStream getInputStreamFromFileId(String fileId); - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java deleted file mode 100644 index 80e1e539c..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.File; -import java.io.IOException; - -import org.apache.commons.io.FileUtils; -import org.argeo.ArgeoException; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; - -/** - * RCP specific composite that provides a control to upload a file. WARNING: for - * the time being we set a GridLayout(2, false) on th eparent control. - */ -public class GenericUploadControl extends Composite { - // private final static Log log = LogFactory - // .getLog(GenericUploadControl.class); - - private FileDialog dialog; - private Text filePath; - - public GenericUploadControl(Composite parent, int style, String browseLabel) { - super(parent, style); - createControl(this, browseLabel); - - } - - private void createControl(final Composite parent, String browseLabel) { - parent.setLayout(new GridLayout(2, false)); - - filePath = new Text(parent, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.GRAB_HORIZONTAL - | GridData.FILL_HORIZONTAL); - filePath.setEditable(false); - filePath.setLayoutData(gd); - - // Execute button - Button execute = new Button(parent, SWT.PUSH); - GridData gridData = new GridData(); - gridData.horizontalAlignment = GridData.BEGINNING; - execute.setLayoutData(gridData); - execute.setText(browseLabel); - - // Button listener - Listener executeListener = new Listener() { - public void handleEvent(Event event) { - dialog = new FileDialog(parent.getShell()); - filePath.setText(dialog.open()); - } - }; - parent.layout(); - execute.addListener(SWT.Selection, executeListener); - } - - public boolean isControlEmpty() { - String path = filePath.getText(); - if (path == null || "".equals(path.trim())) - return true; - else - return false; - } - - public byte[] performUpload() { - String path = filePath.getText(); - if (path != null) { - try { - File file = new File(path); - byte[] fileBA = FileUtils.readFileToByteArray(file); - return fileBA; - } catch (IOException e) { - throw new ArgeoException("Unexpected error while " - + "reading file at path " + path, e); - } - } - return null; - } - - public void addModifyListener(ModifyListener listener) { - filePath.addModifyListener(listener); - } - - /** - * Always returns null in an RCP environment - */ - public String getLastFileUploadedName() { - return null; - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java deleted file mode 100644 index 55065bfa0..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.widgets.Composite; - -public class ImportToServerWizardPage extends WizardPage { - - public final static String FILE_ITEM_TYPE = "FILE"; - public final static String FOLDER_ITEM_TYPE = "FOLDER"; - - private DirectoryFieldEditor dfe; - - public ImportToServerWizardPage() { - super("Import from file system"); - setDescription("Import files from the local file system into the JCR repository"); - } - - public void createControl(Composite parent) { - dfe = new DirectoryFieldEditor("directory", "From", parent); - setControl(dfe.getTextControl(parent)); - } - - public String getObjectPath() { - return dfe.getStringValue(); - } - - public String getObjectType() { - return FOLDER_ITEM_TYPE; - } - - public boolean getNeedsProgressMonitor() { - return true; - } - - // Dummy methods : useless in RCP context but useful for RAP - /** WARNING : always return null in RCP context */ - public String getObjectName() { - return null; - } - - /** WARNING : do nothing in RCP context */ - public void performFinish() { - } - - /** WARNING : always return null in RCP context */ - public InputStream getFileInputStream() { - return null; - } -} \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java deleted file mode 100644 index 610020dd1..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.awt.Desktop; -import java.io.File; -import java.io.IOException; - -import org.argeo.ArgeoException; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; - -/** - * RCP specific command handler to open a file. - * - * The parameter "URI" is used to determine the correct method to open it. - * - * Various instances of this handler with different command ID might coexist in - * order to provide context specific open file service. - * - */ -public class OpenFile extends AbstractHandler { - // private final static Log log = LogFactory.getLog(OpenFile.class); - - public final static String PARAM_FILE_NAME = "param.fileName"; - public final static String PARAM_FILE_URI = "param.fileURI"; - - private final static String FILE_SCHEME = "file"; - - public Object execute(ExecutionEvent event) throws ExecutionException { - @SuppressWarnings("unused") - @Deprecated - String fileName = event.getParameter(PARAM_FILE_NAME); - String fileUri = event.getParameter(PARAM_FILE_URI); - - // sanity check - if (fileUri == null || "".equals(fileUri.trim())) - return null; - - Desktop desktop = null; - if (Desktop.isDesktopSupported()) { - desktop = Desktop.getDesktop(); - } - - File file = getFileFromUri(fileUri); - if (file != null) - try { - desktop.open(file); - } catch (IOException e) { - throw new ArgeoException("Unable to open file with URI: " - + fileUri, e); - } - - return null; - } - - protected File getFileFromUri(String uri) { - if (uri.startsWith(FILE_SCHEME)) { - String path = uri.substring((FILE_SCHEME + "://").length()); - return new File(path); - } - return null; - } -} \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java deleted file mode 100644 index c87f6e54f..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import org.argeo.util.LocaleUtils; -import org.eclipse.osgi.util.NLS; - -/** NLS attached to a given thread */ -public class ThreadNLS extends InheritableThreadLocal { - public final static String DEFAULT_BUNDLE_LOCATION = "/properties/plugin"; - - private final String bundleLocation; - - private Class type; - private Boolean utf8 = false; - - public ThreadNLS(String bundleLocation, Class type, Boolean utf8) { - this.bundleLocation = bundleLocation; - this.type = type; - this.utf8 = utf8; - } - - public ThreadNLS(Class type) { - this(DEFAULT_BUNDLE_LOCATION, type, false); - } - - @Override - protected T initialValue() { - ResourceBundle bundle = ResourceBundle.getBundle(bundleLocation, - LocaleUtils.threadLocale.get(), type.getClassLoader()); - T result; - try { - NLS.initializeMessages(bundleLocation, type); - Constructor constructor = type.getConstructor(); - constructor.setAccessible(true); - result = constructor.newInstance(); - final Field[] fieldArray = type.getDeclaredFields(); - for (int i = 0; i < fieldArray.length; i++) { - int modifiers = fieldArray[i].getModifiers(); - if (String.class.isAssignableFrom(fieldArray[i].getType()) - && Modifier.isPublic(modifiers) - && !Modifier.isStatic(modifiers)) { - try { - String value = bundle - .getString(fieldArray[i].getName()); - byte[] bytes = value.getBytes(); - - String forcedValue; - if (utf8) - forcedValue = new String(bytes, "UTF8"); - else - forcedValue = value; - if (value != null) { - fieldArray[i].setAccessible(true); - fieldArray[i].set(result, forcedValue); - } - } catch (final MissingResourceException mre) { - fieldArray[i].setAccessible(true); - fieldArray[i].set(result, ""); - mre.printStackTrace(); - } - } - } - return result; - } catch (final Exception ex) { - throw new IllegalStateException(ex.getMessage()); - } - } - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java deleted file mode 100644 index 5bdaeceb5..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.widgets.Composite; - -public class UploadFileWizardPage extends WizardPage { - - public final static String FILE_ITEM_TYPE = "FILE"; - public final static String FOLDER_ITEM_TYPE = "FOLDER"; - - private DirectoryFieldEditor dfe; - - public UploadFileWizardPage() { - super("Import from file system"); - setDescription("Import files from the local file system into the JCR repository"); - } - - public void createControl(Composite parent) { - dfe = new DirectoryFieldEditor("directory", "From", parent); - setControl(dfe.getTextControl(parent)); - } - - public String getObjectPath() { - return dfe.getStringValue(); - } - - public String getObjectType() { - return FOLDER_ITEM_TYPE; - } - - public boolean getNeedsProgressMonitor() { - return true; - } - - // Dummy methods : useless in RCP context but useful for RAP - /** WARNING : always return null in RCP context */ - public String getObjectName() { - return null; - } - - /** WARNING : do nothing in RCP context */ - public void performFinish() { - } - - /** WARNING : always return null in RCP context */ - public InputStream getFileInputStream() { - return null; - } -} \ No newline at end of file diff --git a/org.argeo.security.dao.os/.project b/org.argeo.security.dao.os/.project deleted file mode 100644 index cefcc33f3..000000000 --- a/org.argeo.security.dao.os/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.security.dao.os - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml b/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml deleted file mode 100644 index 0a605c7b8..000000000 --- a/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.security.dao.os/META-INF/spring/security-os.xml b/org.argeo.security.dao.os/META-INF/spring/security-os.xml deleted file mode 100644 index 69880f750..000000000 --- a/org.argeo.security.dao.os/META-INF/spring/security-os.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - osgibundle:security.properties - - - - - - - - /org/argeo/jcr/argeo.cnd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.security.dao.os/bnd.bnd b/org.argeo.security.dao.os/bnd.bnd deleted file mode 100644 index 0df3b4a65..000000000 --- a/org.argeo.security.dao.os/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Import-Package: org.argeo.jcr,* \ No newline at end of file diff --git a/org.argeo.security.dao.os/build.properties b/org.argeo.security.dao.os/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/org.argeo.security.dao.os/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/org.argeo.security.dao.os/pom.xml b/org.argeo.security.dao.os/pom.xml deleted file mode 100644 index 05ee4ccd4..000000000 --- a/org.argeo.security.dao.os/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.security.dao.os - Commons Security DAO OS - \ No newline at end of file diff --git a/org.argeo.security.dao.os/security.properties b/org.argeo.security.dao.os/security.properties deleted file mode 100644 index ae77bf04d..000000000 --- a/org.argeo.security.dao.os/security.properties +++ /dev/null @@ -1,2 +0,0 @@ -argeo.security.systemKey=argeo -argeo.node.repo.securityWorkspace=security diff --git a/org.argeo.security.ui.rcp/.classpath b/org.argeo.security.ui.rcp/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.security.ui.rcp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.security.ui.rcp/.project b/org.argeo.security.ui.rcp/.project deleted file mode 100644 index feeafcf5b..000000000 --- a/org.argeo.security.ui.rcp/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.security.ui.rcp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs b/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 1f382cb9d..000000000 --- a/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sat Jan 15 17:51:30 CET 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.argeo.security.ui.rcp/META-INF/jaas_default.txt b/org.argeo.security.ui.rcp/META-INF/jaas_default.txt deleted file mode 100644 index 16d476daf..000000000 --- a/org.argeo.security.ui.rcp/META-INF/jaas_default.txt +++ /dev/null @@ -1,27 +0,0 @@ -OS_SPRING { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -NIX { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule requisite - extensionId="org.argeo.security.equinox.unixLoginModule"; - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -WINDOWS { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule requisite - extensionId="org.argeo.security.equinox.ntLoginModule"; - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -REMOTE { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule sufficient - extensionId="org.argeo.security.equinox.springLoginModuleRemote"; -}; - -KEYRING { - org.argeo.security.crypto.KeyringLoginModule required; -}; diff --git a/org.argeo.security.ui.rcp/bnd.bnd b/org.argeo.security.ui.rcp/bnd.bnd deleted file mode 100644 index 342ab79b0..000000000 --- a/org.argeo.security.ui.rcp/bnd.bnd +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Activator: org.argeo.security.ui.rcp.SecureApplicationActivator -Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime -Import-Package: org.argeo.eclipse.ui.specific,\ -org.argeo.eclipse.spring,\ -* diff --git a/org.argeo.security.ui.rcp/build.properties b/org.argeo.security.ui.rcp/build.properties deleted file mode 100644 index 5ac3de985..000000000 --- a/org.argeo.security.ui.rcp/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - log4j.properties diff --git a/org.argeo.security.ui.rcp/icons/alt_about.gif b/org.argeo.security.ui.rcp/icons/alt_about.gif deleted file mode 100644 index 20d9ad2d9..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_about.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.icns b/org.argeo.security.ui.rcp/icons/alt_launcher.icns deleted file mode 100644 index b77a6a639..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_launcher.icns and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.ico b/org.argeo.security.ui.rcp/icons/alt_launcher.ico deleted file mode 100644 index d548f7109..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_launcher.ico and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.xpm b/org.argeo.security.ui.rcp/icons/alt_launcher.xpm deleted file mode 100644 index b0c139e06..000000000 --- a/org.argeo.security.ui.rcp/icons/alt_launcher.xpm +++ /dev/null @@ -1,307 +0,0 @@ -/* XPM */ -static char * icon48_xpm[] = { -"48 48 256 2", -" c #4B4B3B3B9090", -". c #0D0D0E0E5454", -"X c #11110E0E5B5B", -"o c #17170F0F6363", -"O c #1D1D13136969", -"+ c #212114146C6C", -"@ c #252514147171", -"# c #282811116C6C", -"$ c #26260D0D6363", -"% c #22220B0B5E5E", -"& c #1C1C0B0B5A5A", -"* c #1C1C0B0B5252", -"= c #1B1B05055353", -"- c #161606064D4D", -"; c #161605054949", -": c #111104044848", -"> c #131304044545", -", c #131305054242", -"< c #141410105E5E", -"1 c #2C2C15157373", -"2 c #2B2B1B1B7575", -"3 c #343416167272", -"4 c #313113136E6E", -"5 c #222209095757", -"6 c #1B1B06064D4D", -"7 c #15150B0B4242", -"8 c #13130C0C5555", -"9 c #2E2E1B1B7878", -"0 c #33331F1F7C7C", -"q c #343418187878", -"w c #3B3B1C1C7575", -"e c #2E2E10106767", -"r c #1B1B07074747", -"t c #18180B0B4646", -"y c #151513136262", -"u c #1A1A15156464", -"i c #34341F1F7777", -"p c #40401E1E8080", -"a c #42421B1B7A7A", -"s c #3B3B15157474", -"d c #2B2B0B0B5B5B", -"f c #222207075252", -"g c #373727277A7A", -"h c #474724248484", -"j c #393915156E6E", -"k c #373711116A6A", -"l c #343413136363", -"z c #232319196E6E", -"x c #292919197070", -"c c #3C3C2C2C8282", -"v c #444431318585", -"b c #494934348A8A", -"n c #505026268A8A", -"m c #3D3D1B1B6E6E", -"M c #31310E0E5C5C", -"N c #2B2B0D0D5353", -"B c #222207074A4A", -"V c #52523C3C9292", -"C c #58583C3C9494", -"Z c #5D5D44449797", -"A c #5C5C2E2E9292", -"S c #676733339595", -"D c #424228287575", -"F c #29290A0A4F4F", -"G c #6C6C4A4A9E9E", -"H c #72725454A7A7", -"J c #8C8C6D6DB2B2", -"K c #343424246E6E", -"L c #3A3A23236A6A", -"P c #3A3A1C1C6767", -"I c #24240A0A4B4B", -"U c #151518186161", -"Y c #76766F6FA5A5", -"T c #ADAD9191CCCC", -"R c #98988989D3D3", -"E c #45453B3B8686", -"W c #3C3C35357979", -"Q c #363631317575", -"! c #32322D2D6B6B", -"~ c #323229296363", -"^ c #30301F1F6262", -"/ c #323218185E5E", -"( c #272707074B4B", -") c #202028286C6C", -"_ c #1E1E1D1D6868", -"` c #9A9A8282BBBB", -"' c #C8C8B3B3D3D3", -"] c #B3B3AFAFE7E7", -"[ c #84847272C6C6", -"{ c #58585757A3A3", -"} c #3F3F3C3C8A8A", -"| c #3B3B3A3A8484", -" . c #414139397D7D", -".. c #3D3D39397A7A", -"X. c #37372E2E6E6E", -"o. c #2C2C21215A5A", -"O. c #2E2E1B1B5B5B", -"+. c #F5F5EFEFF5F5", -"@. c #656566669A9A", -"#. c #47474B4B8E8E", -"$. c #3C3C44447B7B", -"%. c #444442428080", -"&. c #45453E3E8181", -"*. c #40403C3C8181", -"=. c #3D3D33337474", -"-. c #3B3B30306E6E", -";. c #38382D2D6969", -":. c #303026265D5D", -">. c #2C2C15155A5A", -",. c #1F1F1C1C7070", -"<. c #25251E1E7171", -"1. c #59595C5C9191", -"2. c #4D4D53538989", -"3. c #4C4C49498484", -"4. c #484845458585", -"5. c #494941418585", -"6. c #494940408181", -"7. c #2F2F1C1C5353", -"8. c #2B2B28287676", -"9. c #323231317F7F", -"0. c #545452528B8B", -"q. c #51514E4E8989", -"w. c #4E4E4B4B8C8C", -"e. c #4C4C47478686", -"r. c #46463D3D7E7E", -"t. c #434336367A7A", -"y. c #2B2B13135555", -"u. c #47473D3D8D8D", -"i. c #575757578E8E", -"p. c #48483E3E7F7F", -"a. c #46463A3A7D7D", -"s. c #424235357575", -"d. c #404034347171", -"f. c #BFBFCBCBFAFA", -"g. c #B8B8A8A8DDDD", -"h. c #5E5E60609292", -"j. c #565655558C8C", -"k. c #4B4B44448282", -"l. c #454539397B7B", -"z. c #434338387878", -"x. c #3F3F32326D6D", -"c. c #3D3D30306969", -"v. c #3A3A2E2E6363", -"b. c #36362A2A5C5C", -"n. c #343424245555", -"m. c #30301E1E4D4D", -"M. c #49493C3C8282", -"N. c #5E5E4F4F8C8C", -"B. c #56563B3B8B8B", -"V. c #545407078585", -"C. c #424234347272", -"Z. c #9797A4A4F7F7", -"A. c #444436367676", -"S. c #7D7D7979D5D5", -"D. c #464640408A8A", -"F. c #44444B4B8282", -"G. c #414107077777", -"H. c #71716161C1C1", -"J. c #303039397979", -"K. c #8E8E8E8EE6E6", -"L. c #404033338B8B", -"P. c #4A4A45458C8C", -"I. c #46463A3A8080", -"U. c #363629295454", -"Y. c #303022224848", -"T. c #424237377575", -"R. c #2E2E1D1D6363", -"E. c #79798383EAEA", -"W. c #74747B7BE4E4", -"Q. c #6D6D7676D6D6", -"!. c #6A6A7171CECE", -"~. c #66666969C6C6", -"^. c #62626565BCBC", -"/. c #5F5F6060B5B5", -"(. c #5B5B5B5BACAC", -"). c #535353539898", -"_. c #4F4F4F4FA4A4", -"`. c #54544D4DA4A4", -"'. c #323204046B6B", -"]. c #303035357979", -"[. c #313122224343", -"{. c #5A5A5B5BB7B7", -"}. c #484846468080", -"|. c #454541417575", -" X c #4B4B31318282", -".X c #47473C3C8484", -"XX c #3E3E35356E6E", -"oX c #2F2F26264040", -"OX c #2B2B23233A3A", -"+X c #262619195C5C", -"@X c #252515155A5A", -"#X c #55555151B3B3", -"$X c #3C3C2D2D5D5D", -"%X c #39392F2F5656", -"&X c #37372D2D5050", -"*X c #25251F1F3030", -"=X c #24241D1D4343", -"-X c #202013135656", -";X c #41413B3B6C6C", -":X c #444442429696", -">X c #212100005E5E", -",X c #444436367272", -" > , , , ", -" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ", -" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ", -" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ", -" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ", -" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ", -" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ", -" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ", -" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ", -" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ", -" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ", -" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ", -" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ", -" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ", -" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ", -" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ", -" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ", -" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ", -" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ", -" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ", -" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ", -" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ", -" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ", -" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ", -" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ", -" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ", -" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ", -" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ", -" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,XX7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X > > t t t cX ", -" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ", -" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ", -" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ", -" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ", -" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ", -" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ", -" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ", -" "}; diff --git a/org.argeo.security.ui.rcp/icons/alt_window_16.gif b/org.argeo.security.ui.rcp/icons/alt_window_16.gif deleted file mode 100644 index 05626b17d..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_window_16.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_window_32.gif b/org.argeo.security.ui.rcp/icons/alt_window_32.gif deleted file mode 100644 index b432f8833..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_window_32.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/plugin.xml b/org.argeo.security.ui.rcp/plugin.xml deleted file mode 100644 index 4ddf700d5..000000000 --- a/org.argeo.security.ui.rcp/plugin.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.argeo.security.ui.rcp/plugin_customization.ini b/org.argeo.security.ui.rcp/plugin_customization.ini deleted file mode 100644 index baf9cefe7..000000000 --- a/org.argeo.security.ui.rcp/plugin_customization.ini +++ /dev/null @@ -1,5 +0,0 @@ -org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight -org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=true -org.eclipse.ui/PERSPECTIVE_BAR_SIZE=100 -org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true -org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false diff --git a/org.argeo.security.ui.rcp/pom.xml b/org.argeo.security.ui.rcp/pom.xml deleted file mode 100644 index 92a6b8755..000000000 --- a/org.argeo.security.ui.rcp/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12-SNAPSHOT - argeo-commons - .. - - org.argeo.security.ui.rcp - Commons Security UI RCP - jar - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - - - - - - - - org.argeo.commons - org.argeo.util - 2.1.12-SNAPSHOT - - - - - - - - - - - org.argeo.commons - org.argeo.security.ui - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.security.equinox - 2.1.12-SNAPSHOT - - - - - org.argeo.commons - org.argeo.eclipse.ui.rcp - 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.eclipse.dep.rcp - pom - 2.1.12-SNAPSHOT - - - \ No newline at end of file diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java deleted file mode 100644 index 75184cbab..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import java.security.PrivilegedAction; - -import javax.security.auth.Subject; -import javax.security.auth.login.LoginException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.OperatingSystem; -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.equinox.security.auth.ILoginContext; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.application.WorkbenchAdvisor; - -/** - * RCP workbench initialization - */ -public abstract class AbstractSecureApplication implements IApplication { - final static String NODE_REPO_URI = "argeo.node.repo.uri"; - - private static final Log log = LogFactory - .getLog(AbstractSecureApplication.class); - - protected WorkbenchAdvisor createWorkbenchAdvisor(String username) { - return new SecureWorkbenchAdvisor(username); - } - - public Object start(IApplicationContext context) throws Exception { - // wait for the system to be initialized - // try { - // Thread.sleep(3000); - // } catch (Exception e2) { - // // silent - // } - - boolean remote = System.getProperty(NODE_REPO_URI) != null; - - // choose login context - final ILoginContext loginContext; - if (remote) { - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_REMOTE); - } else { - if (OperatingSystem.os == OperatingSystem.WINDOWS) - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_WINDOWS); - else - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_NIX); - } - - final Display display = PlatformUI.createDisplay(); - - // login - Subject subject = null; - try { - loginContext.login(); - subject = loginContext.getSubject(); - } catch (LoginException e) { - log.error("Error when logging in.", e); - display.dispose(); - try { - Thread.sleep(2000); - } catch (InterruptedException e1) { - // silent - } - return null; - } - - // identify after successful login - if (log.isDebugEnabled()) - log.debug("subject=" + subject); - final String username = subject.getPrincipals().iterator().next() - .getName(); - if (log.isDebugEnabled()) - log.debug(username + " logged in"); -// display.disposeExec(new Runnable() { -// public void run() { -// log.debug("Display disposed"); -// logout(loginContext, username); -// } -// }); - - try { - PrivilegedAction privilegedAction = new PrivilegedAction() { - public Object run() { - int result = PlatformUI.createAndRunWorkbench(display, - createWorkbenchAdvisor(username)); - return new Integer(result); - } - }; - - Integer returnCode = (Integer) Subject.doAs(subject, - privilegedAction); - logout(loginContext, username); - return processReturnCode(returnCode); - } catch (Exception e) { - if (subject != null) - logout(loginContext, username); - log.error("Unexpected error", e); - } finally { - display.dispose(); - } - return null; - } - - protected Integer processReturnCode(Integer returnCode) { - if (returnCode == PlatformUI.RETURN_RESTART) - return IApplication.EXIT_RESTART; - else - return IApplication.EXIT_OK; - } - - static void logout(ILoginContext secureContext, String username) { - try { - secureContext.logout(); - log.info("Logged out " + (username != null ? username : "") - + " (THREAD=" + Thread.currentThread().getId() + ")"); - } catch (LoginException e) { - log.error("Erorr when logging out", e); - } - } - - public void stop() { - final IWorkbench workbench; - try { - workbench = PlatformUI.getWorkbench(); - } catch (Exception e) { - return; - } - if (workbench == null) - return; - final Display display = workbench.getDisplay(); - if (display != null && !display.isDisposed()) - display.syncExec(new Runnable() { - - public void run() { - if (!display.isDisposed()) - workbench.close(); - } - }); - - if (log.isDebugEnabled()) - log.debug("workbench stopped"); - } - -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java deleted file mode 100644 index 481865bfa..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.jface.action.GroupMarker; -import org.eclipse.jface.action.ICoolBarManager; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.action.ToolBarManager; -import org.eclipse.swt.SWT; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; - -public class SecureActionBarAdvisor extends ActionBarAdvisor { - private IWorkbenchAction exitAction; - private IWorkbenchAction openPerspectiveDialogAction; - private IWorkbenchAction showViewMenuAction; - private IWorkbenchAction preferences; - private IWorkbenchAction saveAction; - private IWorkbenchAction saveAsAction; - private IWorkbenchAction saveAllAction; - private IWorkbenchAction closeAllAction; - - // private final Boolean isRcp; - - public SecureActionBarAdvisor(IActionBarConfigurer configurer, Boolean isRcp) { - super(configurer); - // this.isRcp = isRcp; - } - - protected void makeActions(IWorkbenchWindow window) { - preferences = ActionFactory.PREFERENCES.create(window); - register(preferences); - openPerspectiveDialogAction = ActionFactory.OPEN_PERSPECTIVE_DIALOG - .create(window); - register(openPerspectiveDialogAction); - showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window); - register(showViewMenuAction); - - exitAction = ActionFactory.QUIT.create(window); - register(exitAction); - - // Save semantiocs - saveAction = ActionFactory.SAVE.create(window); - register(saveAction); - saveAsAction = ActionFactory.SAVE_AS.create(window); - register(saveAsAction); - saveAllAction = ActionFactory.SAVE_ALL.create(window); - register(saveAllAction); - closeAllAction = ActionFactory.CLOSE_ALL.create(window); - register(closeAllAction); - - } - - protected void fillMenuBar(IMenuManager menuBar) { - MenuManager fileMenu = new MenuManager("&File", - IWorkbenchActionConstants.M_FILE); - MenuManager editMenu = new MenuManager("&Edit", - IWorkbenchActionConstants.M_EDIT); - MenuManager windowMenu = new MenuManager("&Window", - IWorkbenchActionConstants.M_WINDOW); - - menuBar.add(fileMenu); - menuBar.add(editMenu); - menuBar.add(windowMenu); - // Add a group marker indicating where action set menus will appear. - menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - - // File - fileMenu.add(saveAction); - fileMenu.add(saveAsAction); - fileMenu.add(saveAllAction); - fileMenu.add(closeAllAction); - fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - fileMenu.add(new Separator()); - fileMenu.add(exitAction); - - // Edit - editMenu.add(preferences); - - // Window - windowMenu.add(openPerspectiveDialogAction); - windowMenu.add(showViewMenuAction); - } - - @Override - protected void fillCoolBar(ICoolBarManager coolBar) { - IToolBarManager saveToolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); - saveToolbar.add(saveAction); - saveToolbar.add(saveAllAction); - coolBar.add(saveToolbar); - } - -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java deleted file mode 100644 index 9c0425c5b..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import java.net.URL; - -import org.eclipse.equinox.security.auth.ILoginContext; -import org.eclipse.equinox.security.auth.LoginContextFactory; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** Activator able to create {@link ILoginContext} */ -public class SecureApplicationActivator implements BundleActivator { - - public final static String CONTEXT_REMOTE = "REMOTE"; - public final static String CONTEXT_NIX = "NIX"; - public final static String CONTEXT_WINDOWS = "WINDOWS"; - private static final String JAAS_CONFIG_FILE = "/META-INF/jaas_default.txt"; - - private static BundleContext bundleContext; - - public void start(BundleContext bundleContext) throws Exception { - SecureApplicationActivator.bundleContext = bundleContext; - } - - public void stop(BundleContext context) throws Exception { - } - - static ILoginContext createLoginContext(String context) { - URL configUrl = bundleContext.getBundle().getEntry(JAAS_CONFIG_FILE); - return LoginContextFactory.createContext(context, configUrl); - } -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java deleted file mode 100644 index d8125cf6f..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - - -public class SecureRcp extends AbstractSecureApplication { -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java deleted file mode 100644 index 33b781ee5..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.application.IWorkbenchConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -/** - * Workbench configuration which is aware of the logged in user and can remember - * workbench state. - */ -public class SecureWorkbenchAdvisor extends WorkbenchAdvisor { - public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective"; - public final static String SAVE_AND_RESTORE_PROPERTY = "org.argeo.security.ui.saveAndRestore"; - - private String initialPerspective = System.getProperty( - INITIAL_PERSPECTIVE_PROPERTY, null); - - private final String username; - - public SecureWorkbenchAdvisor(String username) { - this.username = username; - } - - @Override - public void initialize(final IWorkbenchConfigurer configurer) { - super.initialize(configurer); - Boolean saveAndRestore = Boolean.parseBoolean(System.getProperty( - SAVE_AND_RESTORE_PROPERTY, "true")); - configurer.setSaveAndRestore(saveAndRestore); - } - - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor( - IWorkbenchWindowConfigurer configurer) { - return new SecureWorkbenchWindowAdvisor(configurer, username); - } - - public String getInitialWindowPerspectiveId() { - if (initialPerspective != null) { - // check whether this user can see the declared perspective - // (typically the perspective won't be listed if this user doesn't - // have the right to see it) - IPerspectiveDescriptor pd = getWorkbenchConfigurer().getWorkbench() - .getPerspectiveRegistry() - .findPerspectiveWithId(initialPerspective); - if (pd == null) - return null; - } - return initialPerspective; - } - - protected String getUsername() { - return username; - } -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java deleted file mode 100644 index d8aaec443..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class SecureWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { - private final String username; - - public SecureWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer, - String username) { - super(configurer); - this.username = username; - } - - public ActionBarAdvisor createActionBarAdvisor( - IActionBarConfigurer configurer) { - return new SecureActionBarAdvisor(configurer, true); - } - - public void preWindowOpen() { - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(1200, 900)); - configurer.setShowCoolBar(true); - configurer.setShowMenuBar(true); - configurer.setShowStatusLine(true); - configurer.setShowProgressIndicator(true); - - configurer.setShowPerspectiveBar(true); - String remoteUri = System - .getProperty(AbstractSecureApplication.NODE_REPO_URI); - if (remoteUri != null) - configurer - .setTitle("Argeo UI - " + username + " (" + remoteUri + ")"); //$NON-NLS-1$ - else - configurer.setTitle("Argeo UI - " + username); //$NON-NLS-1$ - - } -} diff --git a/pom.xml b/pom.xml index 5e7ddf01a..207a66c5d 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,6 @@ org.argeo.security.auth.ldap org.argeo.security.dao.ldap org.argeo.security.dao.cli - org.argeo.security.dao.os org.argeo.security.dao.jackrabbit org.argeo.server.jcr.mvc @@ -47,7 +46,6 @@ org.argeo.eclipse.ui org.argeo.eclipse.ui.rap - org.argeo.eclipse.ui.rcp org.argeo.node.repo.jackrabbit org.argeo.cms @@ -58,7 +56,6 @@ org.argeo.security.ui.admin org.argeo.security.ui.rap - org.argeo.security.ui.rcp org.argeo.server.core