Author: elvisisking
Date: 2009-07-08 12:11:59 -0400 (Wed, 08 Jul 2009)
New Revision: 1076
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/
Removed:
branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8-sources.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8.jar
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath
branches/eclipse/org.jboss.dna.publish.ui.swt/.project
branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF
branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java
Log:
Most changes due to project name and package name refactoring. The non-UI plugin project
has been converted to a Maven project. Fixed some problems with the delete server dialog.
Added tooltips to ServerView tree. Made PublishPage a server registry listener since new
servers can be created from this page. Added images to wizards.
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath 2009-07-08 15:59:30 UTC (rev
1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/.classpath 2009-07-08 16:11:59 UTC (rev
1076)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib"
path="dna-web-jcr-rest-client-0.6-SNAPSHOT.jar"
sourcepath="dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/.project
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/.project 2009-07-08 15:59:30 UTC (rev
1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/.project 2009-07-08 16:11:59 UTC (rev
1076)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.dna.publish.ui.swt.swt</name>
+ <name>org.jboss.dna.web.jcr.rest.client.swt</name>
<comment></comment>
<projects>
</projects>
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt (rev
0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt 2009-07-08 16:11:59 UTC (rev
1076)
@@ -0,0 +1 @@
+Dan Florian (dflorian(a)redhat.com)
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/AUTHORS.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt (rev
0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt 2009-07-08 16:11:59 UTC (rev
1076)
@@ -0,0 +1,6 @@
+The DNA REST Eclipse SWT Client (
http://www.jboss.org/dna/) is copyright 2000-2009
MetaMatrix, Inc. and Red Hat, Inc.
+
+This program and the accompanying materials are made available under the terms of the
Eclipse Public License v1.0 which is
+available at
http://www.eclipse.org/legal/epl-v10.html.
+
+Some portions may be licensed to Red Hat, Inc. under one or more contributor license
agreements.
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/LEGAL.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF 2009-07-08 15:59:30
UTC (rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/META-INF/MANIFEST.MF 2009-07-08 16:11:59
UTC (rev 1076)
@@ -1,14 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
-Bundle-SymbolicName: org.jboss.dna.publish.ui.swt;singleton:=true
+Bundle-SymbolicName: org.jboss.dna.web.jcr.rest.client.swt;singleton:=true
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.dna.publish.ui.swt.Activator
+Bundle-Activator: org.jboss.dna.web.jcr.rest.client.swt.Activator
Bundle-Vendor: %bundleVendor
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.jboss.dna.publish,
org.eclipse.core.resources
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: dna-web-jcr-rest-client-0.6-SNAPSHOT.jar,
+ dnaPublishUi.jar
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-07-08 15:59:30 UTC
(rev 1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-07-08 16:11:59 UTC
(rev 1076)
@@ -1,8 +1,18 @@
-source.. = src/
-output.. = bin/
+# JBoss, Home of Professional Open Source.
+#
+# See the LEGAL.txt file distributed with this work for information regarding copyright
ownership and licensing.
+#
+# See the AUTHORS.txt file distributed with this work for a full listing of individual
contributors.
+source.dnaPublishUi.jar = src/
+output.dnaPublishUi.jar = bin/
bin.includes = META-INF/,\
- .,\
+ dnaPublishUi.jar,\
plugin.properties,\
icons/,\
- plugin.xml
-src.includes = src/
+ plugin.xml,\
+ dna-web-jcr-rest-client-0.6-SNAPSHOT.jar,\
+ LEGAL.txt,\
+ AUTHORS.txt
+src.includes = src/,\
+ LEGAL.txt
+source.dnaPublishUi.jar = src/
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT-sources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/dna-web-jcr-rest-client-0.6-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/dna_window.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/wizards/dna_wizard_banner.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-07-08 15:59:30 UTC (rev
1075)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-07-08 16:11:59 UTC (rev
1076)
@@ -6,10 +6,10 @@
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
- id="org.jboss.dna.publish.ui.swt.iresourcepopupmenucontribution"
+
id="org.jboss.dna.web.jcr.rest.client.swt.iresourcepopupmenucontribution"
objectClass="org.eclipse.core.resources.IResource">
<menu
- id="org.jboss.dna.publish.ui.swt.contextMenu"
+ id="org.jboss.dna.web.jcr.rest.client.swt.contextMenu"
label="%contextMenu.label"
path="additions">
<separator
@@ -19,10 +19,10 @@
<!-- Unpublish action -->
<action
- id="org.jboss.dna.publish.ui.swt.unpublishAction"
+ id="org.jboss.dna.web.jcr.rest.client.swt.unpublishAction"
label="%unpublishAction.label"
- class="org.jboss.dna.publish.ui.swt.actions.UnpublishAction"
- menubarPath="org.jboss.dna.publish.ui.swt.contextMenu/group1"
+
class="org.jboss.dna.web.jcr.rest.client.swt.actions.UnpublishAction"
+
menubarPath="org.jboss.dna.web.jcr.rest.client.swt.contextMenu/group1"
enablesFor="*">
<enablement>
<or>
@@ -38,10 +38,10 @@
<!-- Publish action -->
<action
- id="org.jboss.dna.publish.ui.swt.publishAction"
+ id="org.jboss.dna.web.jcr.rest.client.swt.publishAction"
label="%publishAction.label"
- class="org.jboss.dna.publish.ui.swt.actions.PublishAction"
- menubarPath="org.jboss.dna.publish.ui.swt.contextMenu/group1"
+
class="org.jboss.dna.web.jcr.rest.client.swt.actions.PublishAction"
+
menubarPath="org.jboss.dna.web.jcr.rest.client.swt.contextMenu/group1"
enablesFor="*">
<enablement>
<or>
@@ -70,7 +70,7 @@
id="serverView"
name="%serverView"
category="org.jboss.dna"
- class="org.jboss.dna.publish.ui.swt.views.ServerView"
+ class="org.jboss.dna.web.jcr.rest.client.swt.views.ServerView"
fastViewWidthRatio="0.25"
icon="icons/objects/server.gif">
</view>
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8-sources.jar
===================================================================
(Binary files differ)
Deleted: branches/eclipse/org.jboss.dna.publish.ui.swt/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Deleted:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-08
15:59:30 UTC (rev 1075)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -1,285 +0,0 @@
-/*
- * JBoss DNA (
http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jboss.dna.publish.Logger;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author Dan Florian
- * @since 0.6
- */
-public class Activator extends AbstractUIPlugin implements IUiConstants {
-
- //
===========================================================================================================================
- // Class Fields
- //
===========================================================================================================================
-
- /**
- * The shared plugin instance.
- *
- * @since 0.6
- */
- private static Activator plugin;
-
- //
===========================================================================================================================
- // Class Methods
- //
===========================================================================================================================
-
- /**
- * @return the shared instance or <code>null</code> if not constructed
- * @since 0.6
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- //
===========================================================================================================================
- // Fields
- //
===========================================================================================================================
-
- /**
- * The image used when the requested image cannot be found.
- *
- * @since 0.6
- */
- private Image missingImage;
-
- /**
- * The manager in charge of the server registry.
- *
- * @since 0.6
- */
- private ServerManager serverMgr;
-
- //
===========================================================================================================================
- // Methods
- //
===========================================================================================================================
-
- private ImageDescriptor createImageDescriptor( String key ) {
- try {
- URL url = new URL(getBundle().getEntry("/").toString() + key);
//$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- } catch (final MalformedURLException e) {
- log(new Status(Severity.ERROR, I18n.bind(I18n.MissingImage, key), e));
- return null;
- }
- }
-
- /**
- * @return the image to use when a requested image cannot be found
- * @since 0.6
- */
- private Image getMissingImage() {
- if (this.missingImage == null) {
- this.missingImage =
ImageDescriptor.getMissingImageDescriptor().createImage();
- }
-
- return this.missingImage;
- }
-
- /**
- * @param imageId the shared image identifier
- * @return the image or <code>null</code>
- * @see ISharedImages
- * @since 0.6
- */
- public Image getSharedImage( String imageId ) {
- Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
- return ((result == null) ? getMissingImage() : result);
- }
-
- /**
- * @param imageId the shared image identifier
- * @return the image descriptor or <code>null</code>
- * @see ISharedImages
- * @since 0.6
- */
- public ImageDescriptor getSharedImageDescriptor( String imageId ) {
- ImageDescriptor result =
PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageId);
-
- if (result != null) {
- return result;
- }
-
- return ImageDescriptor.getMissingImageDescriptor();
- }
-
- /**
- * @param object the object whose image is being requested (domain object or
plugin-relative path)
- * @return the image or <code>null</code> if not found
- * @since 0.6
- */
- public Image getImage( Object object ) {
- String key = null;
-
- if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
- } else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
- } else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
- } else if (object instanceof IDnaObject) {
- // should have an icon for every business object
- assert false;
- } else if (object instanceof String) {
- key = (String)object;
- }
-
- if (key != null) {
- ImageRegistry registry = getImageRegistry();
- Image image = registry.get(key);
-
- if (image == null) {
- ImageDescriptor descriptor = createImageDescriptor(key);
-
- if (descriptor == null) {
- return getMissingImage();
- }
-
- image = descriptor.createImage();
- registry.put(key, image);
- }
-
- return image;
- }
-
- return null;
- }
-
- /**
- * @param object the object whose image descriptor is being requested
- * @return the image descriptor or <code>null</code> if not found
- * @since 0.6
- */
- public ImageDescriptor getImageDescriptor( Object object ) {
- String key = null;
-
- if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
- } else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
- } else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
- } else if (object instanceof IDnaObject) {
- // should have an icon for every business object
- assert false;
- } else if (object instanceof String) {
- key = (String)object;
- }
-
- if (key != null) {
- ImageDescriptor descriptor =
AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
- return ((descriptor == null) ? ImageDescriptor.getMissingImageDescriptor() :
descriptor);
- }
-
- return null;
- }
-
- /**
- * @return the server manager or <code>null</code> if activator has not
been initialized or started
- * @see #start(BundleContext)
- * @since 0.6
- */
- public ServerManager getServerManager() {
- return this.serverMgr;
- }
-
- /**
- * @param status the status being logged
- * @since 0.6
- */
- public void log( Status status ) {
- IStatus eclipseStatus = new
org.eclipse.core.runtime.Status(Utils.convertSeverity(status.getSeverity()),
-
IUiConstants.PLUGIN_ID, status.getMessage(),
-
status.getException());
- getLog().log(eclipseStatus);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see
org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- * @since 0.6
- */
- @Override
- public void start( BundleContext context ) throws Exception {
- super.start(context);
- plugin = this;
-
- this.serverMgr = new
ServerManager(getStateLocation().toFile().getAbsolutePath());
- Status status = this.serverMgr.restoreState();
-
- // problem restoring server registry
- if (!status.isOk()) {
- Logger.log(getClass(), status);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- * @since 0.6
- */
- @Override
- public void stop( BundleContext context ) throws Exception {
- if (missingImage != null) {
- missingImage.dispose();
- }
-
- if (this.serverMgr != null) {
- Status status = this.serverMgr.saveState();
-
- if (!status.isOk()) {
- log(status);
- }
-
- this.serverMgr = null;
- }
-
- super.stop(context);
-
- plugin = null;
- }
-
-}
Deleted:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-08
15:59:30 UTC (rev 1075)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -1,120 +0,0 @@
-/*
- * JBoss DNA (
http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The I18n class handles localization messages.
- *
- * @author Dan Florian
- * @since 0.6
- */
-public final class I18n extends NLS {
-
- public static String BasePublishingActionPublishingWizardErrorMsg;
- public static String BasePublishingActionUnpublishingWizardErrorMsg;
-
- public static String CollapseActionToolTip;
-
- public static String DeleteServerActionText;
- public static String DeleteServerActionToolTip;
-
- public static String DeleteServerDialogErrorsOccurredMsg;
- public static String DeleteServerDialogMultipleServersMsg;
- public static String DeleteServerDialogOneServerMsg;
- public static String DeleteServerDialogTitle;
-
- public static String EditServerActionText;
- public static String EditServerActionToolTip;
-
- public static String ErrorDialogTitle;
-
- public static String MissingImage;
-
- public static String NewServerActionText;
- public static String NewServerActionToolTip;
-
- public static String PublishOperationPublishTaskName;
- public static String PublishOperationPublishTitle;
- public static String PublishOperationUnpublishTaskName;
- public static String PublishOperationUnpublishTitle;
-
- public static String PublishPagePublishTitle;
- public static String PublishPageLocationGroupTitle;
- public static String PublishPageMissingRepositoryStatusMsg;
- public static String PublishPageMissingServerStatusMsg;
- public static String PublishPageMissingWorkspaceStatusMsg;
- public static String PublishPageNewServerButton;
- public static String PublishPageNoAvailableRepositoriesStatusMsg;
- public static String PublishPageNoAvailableServersStatusMsg;
- public static String PublishPageNoAvailableWorkspacesStatusMsg;
- public static String PublishPageNoResourcesToPublishStatusMsg;
- public static String PublishPageNoResourcesToUnpublishStatusMsg;
- public static String PublishPagePublishOkStatusMsg;
- public static String PublishPagePublishResourcesLabel;
- public static String PublishPageRecurseCheckBox;
- public static String PublishPageRecurseCheckBoxToolTip;
- public static String PublishPageRecurseProcessingErrorMsg;
- public static String PublishPageRepositoryLabel;
- public static String PublishPageRepositoryToolTip;
- public static String PublishPageServerLabel;
- public static String PublishPageServerToolTip;
- public static String PublishPageUnpublishOkStatusMsg;
- public static String PublishPageUnpublishResourcesLabel;
- public static String PublishPageUnpublishTitle;
- public static String PublishPageWorkspaceLabel;
- public static String PublishPageWorkspacePublishToolTip;
- public static String PublishPageWorkspaceUnpublishToolTip;
-
- public static String PublishWizardPublishErrorMsg;
- public static String PublishWizardPublishTitle;
- public static String PublishWizardUnpublishTitle;
- public static String PublishWizardUnpublishErrorMsg;
-
- public static String ServerPageAuthenticationGroupTitle;
- public static String ServerPageInvalidServerProperties;
- public static String ServerPageOkStatusMsg;
- public static String ServerPagePasswordLabel;
- public static String ServerPagePasswordToolTip;
- public static String ServerPageSavePasswordButton;
- public static String ServerPageSavePasswordLabel;
- public static String ServerPageSavePasswordToolTip;
- public static String ServerPageTitle;
- public static String ServerPageUrlLabel;
- public static String ServerPageUrlToolTip;
- public static String ServerPageUserLabel;
- public static String ServerPageUserToolTip;
-
- public static String ServerWizardEditServerErrorMsg;
- public static String ServerWizardEditServerTitle;
- public static String ServerWizardNewServerErrorMsg;
- public static String ServerWizardNewServerTitle;
-
- static {
- // load message bundle
- NLS.initializeMessages(I18n.class.getPackage().getName() + ".i18n",
I18n.class); //$NON-NLS-1$
- }
-
-}
Deleted:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-08
15:59:30 UTC (rev 1075)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -1,65 +0,0 @@
-/*
- * JBoss DNA (
http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-/**
- * @author Dan Florian
- * @since 0.6
- */
-public interface IUiConstants {
-
- /**
- * The Plug-in's identifier.
- *
- * @since 0.6
- */
- String PLUGIN_ID = "org.jboss.dna.publish.ui.swt"; //$NON-NLS-1$
-
- String ICON_PATH = "icons/"; //$NON-NLS-1$
-
- //
- // /icons/objects/
- //
-
- String OBJECT_ICONS_FOLDER = ICON_PATH + "objects/"; //$NON-NLS-1$
-
- String REPOSITORY_IMAGE_PATH = OBJECT_ICONS_FOLDER + "repository.gif";
//$NON-NLS-1$
-
- String SERVER_IMAGE_PATH = OBJECT_ICONS_FOLDER + "server.gif";
//$NON-NLS-1$
-
- String WORKSPACE_IMAGE_PATH = OBJECT_ICONS_FOLDER + "workspace.gif";
//$NON-NLS-1$
-
- //
- // /icons/views/
- //
-
- String VIEW_ICONS_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
-
- String COLLAPSE_ALL_IMAGE_PATH = VIEW_ICONS_FOLDER + "collapse_all.gif";
//$NON-NLS-1$
-
- String EDIT_SERVER_IMAGE_PATH = VIEW_ICONS_FOLDER + "edit_server.gif";
//$NON-NLS-1$
-
- String NEW_SERVER_IMAGE_PATH = VIEW_ICONS_FOLDER + "new_server.gif";
//$NON-NLS-1$
-
-}
Deleted:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java 2009-07-08
15:59:30 UTC (rev 1075)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -1,86 +0,0 @@
-/*
- * JBoss DNA (
http://www.jboss.org/dna)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- *
- * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- * is licensed to you under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * JBoss DNA is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.publish.ui.swt;
-
-import org.eclipse.core.runtime.IStatus;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-
-/**
- * @author Dan Florian
- * @since 0.6
- */
-public final class Utils {
-
- //
===========================================================================================================================
- // Class Methods
- //
===========================================================================================================================
-
- /**
- * Converts the non-Eclipse status severity to an Eclipse severity level. An {@link
Status.Severity#UNKNOWN unknown status} is
- * converted to {@link IStatus#CANCEL cancel}. A {@link Status.Severity} is
- *
- * @param severity the eclipse status severity level
- * @return the converted severity level
- * @see IStatus
- * @since 0.6
- */
- public static int convertSeverity( Severity severity ) {
- if (severity == Severity.OK) return IStatus.OK;
- if (severity == Severity.ERROR) return IStatus.ERROR;
- if (severity == Severity.WARNING) return IStatus.WARNING;
- if (severity == Severity.INFO) return IStatus.INFO;
- return IStatus.CANCEL;
- }
-
- /**
- * Converts the Eclipse status severity level to a non-Eclipse severity.
- *
- * @param severity the eclipse status severity level
- * @return the converted severity level
- * @see IStatus
- * @since 0.6
- */
- public static Severity convertSeverity( int severity ) {
- if (severity == IStatus.OK) return Severity.OK;
- if (severity == IStatus.ERROR) return Severity.ERROR;
- if (severity == IStatus.WARNING) return Severity.WARNING;
- if (severity == IStatus.INFO) return Severity.INFO;
- return Severity.UNKNOWN;
- }
-
- //
===========================================================================================================================
- // Constructors
- //
===========================================================================================================================
-
- /**
- * Don't allow construction.
- *
- * @since 0.6
- */
- public Utils() {
- // nothing to do
- }
-
-}
Deleted:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-08
15:59:30 UTC (rev 1075)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties 2009-07-08
16:11:59 UTC (rev 1076)
@@ -1,101 +0,0 @@
-#
-# JBoss DNA (
http://www.jboss.org/dna)
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-# See the AUTHORS.txt file in the distribution for a full listing of
-# individual contributors.
-#
-# JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
-# is licensed to you under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# JBoss DNA is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-#
-BasePublishingActionPublishingWizardErrorMsg = Unexpected error running the publishing
wizard. See log for more details.
-BasePublishingActionUnpublishingWizardErrorMsg = Unexpected error running the
unpublishing wizard. See log for more details.
-
-CollapseActionToolTip = Collapse All
-
-DeleteServerActionText = Delete Server
-DeleteServerActionToolTip = Delete server from the server registry
-
-DeleteServerDialogErrorsOccurredMsg = There were errors deleting servers from the server
registry. See log for more details.
-DeleteServerDialogMultipleServersMsg = Are you sure you want to delete these {0}
servers?
-DeleteServerDialogOneServerMsg = Are you sure you want to delete the "{0}"
server?
-DeleteServerDialogTitle = Confirm Delete Server
-
-EditServerActionText = Edit Server
-EditServerActionToolTip = Edit server properties
-
-ErrorDialogTitle = Error
-
-MissingImage = The following image cannot be found "{0}"
-
-NewServerActionText = New Server
-NewServerActionToolTip = Create and register a new server
-
-PublishOperationPublishTaskName = Publishing resources
-PublishOperationPublishTitle = Publish
-PublishOperationUnpublishTaskName = Unpublishing resources
-PublishOperationUnpublishTitle = Unpublish
-
-PublishPagePublishTitle = Publish the selected resources
-PublishPageLocationGroupTitle = Location
-PublishPageMissingRepositoryStatusMsg = A repository must be selected
-PublishPageMissingServerStatusMsg = A server must be selected
-PublishPageMissingWorkspaceStatusMsg = A workspace must be selected
-PublishPageNewServerButton = New...
-PublishPageNoAvailableRepositoriesStatusMsg = There are no repositories available on that
server
-PublishPageNoAvailableServersStatusMsg = A server must be created first
-PublishPageNoAvailableWorkspacesStatusMsg = There are no workspaces available on that
server and repository
-PublishPageNoResourcesToPublishStatusMsg = There are no files that can be published
-PublishPageNoResourcesToUnpublishStatusMsg = There are no files that can be unpublished
-PublishPagePublishOkStatusMsg = Choose the server, repository, and workspace where the
selected resources will be published.
-PublishPagePublishResourcesLabel = These resources will be published to the specified DNA
repository:
-PublishPageRecurseCheckBox = Recurse folders and projects
-PublishPageRecurseCheckBoxToolTip = Add all files under folders recursively under
selected projects and folders
-PublishPageRecurseProcessingErrorMsg = Unexpected error processing resources. See log for
more details.
-PublishPageRepositoryLabel = Repository:
-PublishPageRepositoryToolTip = The repository where the workspace is located
-PublishPageServerLabel = Server:
-PublishPageServerToolTip = The server where the repository is located
-PublishPageUnpublishOkStatusMsg = Choose the server, repository, and workspace where the
selected resources will be unpublished.
-PublishPageUnpublishResourcesLabel = These resources will be unpublished from the
specified DNA repository:
-PublishPageUnpublishTitle = Unpublish the selected resources
-PublishPageWorkspaceLabel = Workspace:
-PublishPageWorkspacePublishToolTip = The workspace where the resources are being
published
-PublishPageWorkspaceUnpublishToolTip = The workspace where the resources are being
unpublished
-
-PublishWizardPublishErrorMsg = Error Publishing
-PublishWizardPublishTitle = Publish
-PublishWizardUnpublishErrorMsg = Error Unpublishing
-PublishWizardUnpublishTitle = Unpublish
-
-ServerPageAuthenticationGroupTitle = Authentication
-ServerPageInvalidServerProperties = Cannot construct a server because all server
properties are not valid
-ServerPageOkStatusMsg = Define the server information where the DNA repositories are
located.
-ServerPagePasswordLabel = Password:
-ServerPagePasswordToolTip = The password used to authenticate the user when connecting to
the server
-ServerPageSavePasswordButton = Save password
-ServerPageSavePasswordLabel = Saved secret data is stored on your computer in a file
that's difficult, but not impossible, for an intruder to read.
-ServerPageSavePasswordToolTip = Indicates if the clear text password should be stored on
the local file system
-ServerPageTitle = Enter Server Information
-ServerPageUrlLabel = URL:
-ServerPageUrlToolTip = The URL used to connect to the server
-ServerPageUserLabel = User:
-ServerPageUserToolTip = The user login used when connecting to the server
-
-ServerWizardEditServerErrorMsg = There were errors editing a server. See log for more
details.
-ServerWizardEditServerTitle = Edit Server
-ServerWizardNewServerErrorMsg = There were errors creating a new server. See log for more
details.
-ServerWizardNewServerTitle = New Server
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Activator.java)
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
(rev 0)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -0,0 +1,285 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.dna.web.jcr.rest.client.Logger;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author Dan Florian
+ * @since 0.6
+ */
+public class Activator extends AbstractUIPlugin implements IUiConstants {
+
+ //
===========================================================================================================================
+ // Class Fields
+ //
===========================================================================================================================
+
+ /**
+ * The shared plugin instance.
+ *
+ * @since 0.6
+ */
+ private static Activator plugin;
+
+ //
===========================================================================================================================
+ // Class Methods
+ //
===========================================================================================================================
+
+ /**
+ * @return the shared instance or <code>null</code> if not constructed
+ * @since 0.6
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ //
===========================================================================================================================
+ // Fields
+ //
===========================================================================================================================
+
+ /**
+ * The image used when the requested image cannot be found.
+ *
+ * @since 0.6
+ */
+ private Image missingImage;
+
+ /**
+ * The manager in charge of the server registry.
+ *
+ * @since 0.6
+ */
+ private ServerManager serverMgr;
+
+ //
===========================================================================================================================
+ // Methods
+ //
===========================================================================================================================
+
+ private ImageDescriptor createImageDescriptor( String key ) {
+ try {
+ URL url = new URL(getBundle().getEntry("/").toString() + key);
//$NON-NLS-1$
+ return ImageDescriptor.createFromURL(url);
+ } catch (final MalformedURLException e) {
+ log(new Status(Severity.ERROR, I18n.bind(I18n.MissingImage, key), e));
+ return null;
+ }
+ }
+
+ /**
+ * @return the image to use when a requested image cannot be found
+ * @since 0.6
+ */
+ private Image getMissingImage() {
+ if (this.missingImage == null) {
+ this.missingImage =
ImageDescriptor.getMissingImageDescriptor().createImage();
+ }
+
+ return this.missingImage;
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public Image getSharedImage( String imageId ) {
+ Image result = PlatformUI.getWorkbench().getSharedImages().getImage(imageId);
+ return ((result == null) ? getMissingImage() : result);
+ }
+
+ /**
+ * @param imageId the shared image identifier
+ * @return the image descriptor or <code>null</code>
+ * @see ISharedImages
+ * @since 0.6
+ */
+ public ImageDescriptor getSharedImageDescriptor( String imageId ) {
+ ImageDescriptor result =
PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imageId);
+
+ if (result != null) {
+ return result;
+ }
+
+ return ImageDescriptor.getMissingImageDescriptor();
+ }
+
+ /**
+ * @param object the object whose image is being requested (domain object or
plugin-relative path)
+ * @return the image or <code>null</code> if not found
+ * @since 0.6
+ */
+ public Image getImage( Object object ) {
+ String key = null;
+
+ if (object instanceof Workspace) {
+ key = WORKSPACE_IMAGE_PATH;
+ } else if (object instanceof Repository) {
+ key = REPOSITORY_IMAGE_PATH;
+ } else if (object instanceof Server) {
+ key = SERVER_IMAGE_PATH;
+ } else if (object instanceof IDnaObject) {
+ // should have an icon for every business object
+ assert false;
+ } else if (object instanceof String) {
+ key = (String)object;
+ }
+
+ if (key != null) {
+ ImageRegistry registry = getImageRegistry();
+ Image image = registry.get(key);
+
+ if (image == null) {
+ ImageDescriptor descriptor = createImageDescriptor(key);
+
+ if (descriptor == null) {
+ return getMissingImage();
+ }
+
+ image = descriptor.createImage();
+ registry.put(key, image);
+ }
+
+ return image;
+ }
+
+ return null;
+ }
+
+ /**
+ * @param object the object whose image descriptor is being requested
+ * @return the image descriptor or <code>null</code> if not found
+ * @since 0.6
+ */
+ public ImageDescriptor getImageDescriptor( Object object ) {
+ String key = null;
+
+ if (object instanceof Workspace) {
+ key = WORKSPACE_IMAGE_PATH;
+ } else if (object instanceof Repository) {
+ key = REPOSITORY_IMAGE_PATH;
+ } else if (object instanceof Server) {
+ key = SERVER_IMAGE_PATH;
+ } else if (object instanceof IDnaObject) {
+ // should have an icon for every business object
+ assert false;
+ } else if (object instanceof String) {
+ key = (String)object;
+ }
+
+ if (key != null) {
+ ImageDescriptor descriptor =
AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ((String)object));
+ return ((descriptor == null) ? ImageDescriptor.getMissingImageDescriptor() :
descriptor);
+ }
+
+ return null;
+ }
+
+ /**
+ * @return the server manager or <code>null</code> if activator has not
been initialized or started
+ * @see #start(BundleContext)
+ * @since 0.6
+ */
+ public ServerManager getServerManager() {
+ return this.serverMgr;
+ }
+
+ /**
+ * @param status the status being logged
+ * @since 0.6
+ */
+ public void log( Status status ) {
+ IStatus eclipseStatus = new
org.eclipse.core.runtime.Status(Utils.convertSeverity(status.getSeverity()),
+
IUiConstants.PLUGIN_ID, status.getMessage(),
+
status.getException());
+ getLog().log(eclipseStatus);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see
org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * @since 0.6
+ */
+ @Override
+ public void start( BundleContext context ) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ this.serverMgr = new
ServerManager(getStateLocation().toFile().getAbsolutePath());
+ Status status = this.serverMgr.restoreState();
+
+ // problem restoring server registry
+ if (!status.isOk()) {
+ Logger.log(getClass(), status);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see
org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @since 0.6
+ */
+ @Override
+ public void stop( BundleContext context ) throws Exception {
+ if (missingImage != null) {
+ missingImage.dispose();
+ }
+
+ if (this.serverMgr != null) {
+ Status status = this.serverMgr.saveState();
+
+ if (!status.isOk()) {
+ log(status);
+ }
+
+ this.serverMgr = null;
+ }
+
+ super.stop(context);
+
+ plugin = null;
+ }
+
+}
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/I18n.java)
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
(rev 0)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -0,0 +1,122 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The I18n class handles localization messages.
+ *
+ * @author Dan Florian
+ * @since 0.6
+ */
+public final class I18n extends NLS {
+
+ public static String BasePublishingActionPublishingWizardErrorMsg;
+ public static String BasePublishingActionUnpublishingWizardErrorMsg;
+
+ public static String CollapseActionToolTip;
+
+ public static String DeleteServerActionText;
+ public static String DeleteServerActionToolTip;
+
+ public static String DeleteServerDialogErrorsOccurredMsg;
+ public static String DeleteServerDialogMultipleServersMsg;
+ public static String DeleteServerDialogOneServerMsg;
+ public static String DeleteServerDialogTitle;
+
+ public static String EditServerActionText;
+ public static String EditServerActionToolTip;
+
+ public static String ErrorDialogTitle;
+
+ public static String MissingImage;
+
+ public static String NewServerActionText;
+ public static String NewServerActionToolTip;
+
+ public static String PublishOperationPublishTaskName;
+ public static String PublishOperationPublishTitle;
+ public static String PublishOperationUnpublishTaskName;
+ public static String PublishOperationUnpublishTitle;
+
+ public static String PublishPagePublishTitle;
+ public static String PublishPageLocationGroupTitle;
+ public static String PublishPageMissingRepositoryStatusMsg;
+ public static String PublishPageMissingServerStatusMsg;
+ public static String PublishPageMissingWorkspaceStatusMsg;
+ public static String PublishPageNewServerButton;
+ public static String PublishPageNoAvailableRepositoriesStatusMsg;
+ public static String PublishPageNoAvailableServersStatusMsg;
+ public static String PublishPageNoAvailableWorkspacesStatusMsg;
+ public static String PublishPageNoResourcesToPublishStatusMsg;
+ public static String PublishPageNoResourcesToUnpublishStatusMsg;
+ public static String PublishPagePublishOkStatusMsg;
+ public static String PublishPagePublishResourcesLabel;
+ public static String PublishPageRecurseCheckBox;
+ public static String PublishPageRecurseCheckBoxToolTip;
+ public static String PublishPageRecurseProcessingErrorMsg;
+ public static String PublishPageRepositoryLabel;
+ public static String PublishPageRepositoryToolTip;
+ public static String PublishPageServerLabel;
+ public static String PublishPageServerToolTip;
+ public static String PublishPageUnpublishOkStatusMsg;
+ public static String PublishPageUnpublishResourcesLabel;
+ public static String PublishPageUnpublishTitle;
+ public static String PublishPageWorkspaceLabel;
+ public static String PublishPageWorkspacePublishToolTip;
+ public static String PublishPageWorkspaceUnpublishToolTip;
+
+ public static String PublishWizardPublishErrorMsg;
+ public static String PublishWizardPublishTitle;
+ public static String PublishWizardUnpublishTitle;
+ public static String PublishWizardUnpublishErrorMsg;
+
+ public static String ServerPageAuthenticationGroupTitle;
+ public static String ServerPageInvalidServerProperties;
+ public static String ServerPageOkStatusMsg;
+ public static String ServerPagePasswordLabel;
+ public static String ServerPagePasswordToolTip;
+ public static String ServerPageSavePasswordButton;
+ public static String ServerPageSavePasswordLabel;
+ public static String ServerPageSavePasswordToolTip;
+ public static String ServerPageTitle;
+ public static String ServerPageUrlLabel;
+ public static String ServerPageUrlToolTip;
+ public static String ServerPageUserLabel;
+ public static String ServerPageUserToolTip;
+
+ public static String ServerViewToolTip;
+
+ public static String ServerWizardEditServerErrorMsg;
+ public static String ServerWizardEditServerTitle;
+ public static String ServerWizardNewServerErrorMsg;
+ public static String ServerWizardNewServerTitle;
+
+ static {
+ // load message bundle
+ NLS.initializeMessages(I18n.class.getPackage().getName() + ".i18n",
I18n.class); //$NON-NLS-1$
+ }
+
+}
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/I18n.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/IUiConstants.java)
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
(rev 0)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -0,0 +1,75 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+/**
+ * @author Dan Florian
+ * @since 0.6
+ */
+public interface IUiConstants {
+
+ /**
+ * The Plug-in's identifier.
+ *
+ * @since 0.6
+ */
+ String PLUGIN_ID = "org.jboss.dna.web.jcr.rest.client.swt"; //$NON-NLS-1$
+
+ String ICON_PATH = "icons/"; //$NON-NLS-1$
+
+ //
+ // /icons/objects/
+ //
+
+ String OBJECT_ICONS_FOLDER = ICON_PATH + "objects/"; //$NON-NLS-1$
+
+ String REPOSITORY_IMAGE_PATH = OBJECT_ICONS_FOLDER + "repository.gif";
//$NON-NLS-1$
+
+ String SERVER_IMAGE_PATH = OBJECT_ICONS_FOLDER + "server.gif";
//$NON-NLS-1$
+
+ String WORKSPACE_IMAGE_PATH = OBJECT_ICONS_FOLDER + "workspace.gif";
//$NON-NLS-1$
+
+ //
+ // /icons/views/
+ //
+
+ String VIEWS_ICON_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
+
+ String COLLAPSE_ALL_IMAGE_PATH = VIEWS_ICON_FOLDER + "collapse_all.gif";
//$NON-NLS-1$
+
+ String DNA_WINDOW_IMAGE_PATH = VIEWS_ICON_FOLDER + "dna_window.png";
//$NON-NLS-1$
+
+ String EDIT_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "edit_server.gif";
//$NON-NLS-1$
+
+ String NEW_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "new_server.gif";
//$NON-NLS-1$
+
+ //
+ // /icons/wizards/
+ //
+
+ String WIZARD_ICONS_FOLDER = ICON_PATH + "wizards/"; //$NON-NLS-1$
+
+ String DNA_WIZARD_BANNER_IMAGE_PATH = WIZARD_ICONS_FOLDER +
"dna_wizard_banner.png"; //$NON-NLS-1$
+
+}
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/Utils.java)
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
(rev 0)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -0,0 +1,86 @@
+/*
+ * JBoss DNA (
http://www.jboss.org/dna)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ *
+ * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+ * is licensed to you under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * JBoss DNA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.web.jcr.rest.client.swt;
+
+import org.eclipse.core.runtime.IStatus;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+
+/**
+ * @author Dan Florian
+ * @since 0.6
+ */
+public final class Utils {
+
+ //
===========================================================================================================================
+ // Class Methods
+ //
===========================================================================================================================
+
+ /**
+ * Converts the non-Eclipse status severity to an Eclipse severity level. An {@link
Status.Severity#UNKNOWN unknown status} is
+ * converted to {@link IStatus#CANCEL cancel}. A {@link Status.Severity} is
+ *
+ * @param severity the eclipse status severity level
+ * @return the converted severity level
+ * @see IStatus
+ * @since 0.6
+ */
+ public static int convertSeverity( Severity severity ) {
+ if (severity == Severity.OK) return IStatus.OK;
+ if (severity == Severity.ERROR) return IStatus.ERROR;
+ if (severity == Severity.WARNING) return IStatus.WARNING;
+ if (severity == Severity.INFO) return IStatus.INFO;
+ return IStatus.CANCEL;
+ }
+
+ /**
+ * Converts the Eclipse status severity level to a non-Eclipse severity.
+ *
+ * @param severity the eclipse status severity level
+ * @return the converted severity level
+ * @see IStatus
+ * @since 0.6
+ */
+ public static Severity convertSeverity( int severity ) {
+ if (severity == IStatus.OK) return Severity.OK;
+ if (severity == IStatus.ERROR) return Severity.ERROR;
+ if (severity == IStatus.WARNING) return Severity.WARNING;
+ if (severity == IStatus.INFO) return Severity.INFO;
+ return Severity.UNKNOWN;
+ }
+
+ //
===========================================================================================================================
+ // Constructors
+ //
===========================================================================================================================
+
+ /**
+ * Don't allow construction.
+ *
+ * @since 0.6
+ */
+ public Utils() {
+ // nothing to do
+ }
+
+}
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions)
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/BasePublishingAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/BasePublishingAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
import java.util.Collections;
import java.util.List;
@@ -35,12 +35,12 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.PublishWizard;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishWizard;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/DeleteServerAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
import java.util.ArrayList;
import java.util.List;
@@ -32,12 +32,12 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.dialogs.DeleteServerDialog;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.dialogs.DeleteServerDialog;
/**
* The DeleteServerAction deletes one or more servers from the server registry.
@@ -108,7 +108,7 @@
public void run() {
Dialog dialog = new DeleteServerDialog(this.shell, this.serversToDelete);
- if (dialog.getReturnCode() == Window.OK) {
+ if (dialog.open() == Window.OK) {
boolean errorsOccurred = false;
for (Server server : this.serversToDelete) {
@@ -137,9 +137,11 @@
*/
@Override
protected boolean updateSelection( IStructuredSelection selection ) {
+ // reset selected server collection
+ this.serversToDelete.clear();
+
// disable if empty selection
if (selection.isEmpty()) {
- this.serversToDelete.clear();
return false;
}
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/EditServerAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,18 +21,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.EDIT_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.EDIT_SERVER_IMAGE_PATH;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.ServerWizard;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.ServerWizard;
/**
* @author Dan Florian
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/NewServerAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,16 +21,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.ServerWizard;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.ServerWizard;
/**
* @author Dan Florian
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/PublishAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/PublishAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,9 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* The PublishAction controls the publishing of one or more {@link
org.eclipse.core.resources.IResource}s to a DNA repository.
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/actions/UnpublishAction.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/UnpublishAction.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,9 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.actions;
+package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* The UnpublishAction controls the unpublishing of on or more {@link
org.eclipse.core.resources.IResource}s from a DNA
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs)
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/dialogs/DeleteServerDialog.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/dialogs/DeleteServerDialog.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,24 +21,27 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.dialogs;
+package org.jboss.dna.web.jcr.rest.client.swt.dialogs;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WINDOW_IMAGE_PATH;
import java.util.Collection;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
- * The <code>DeleteServerDialog</code> class provides a UI for deleting a
{@link org.jboss.dna.publish.domain.Server server}.
+ * The <code>DeleteServerDialog</code> class provides a UI for deleting a
{@link Server server}.
*
* @author Dan Florian
* @since 0.6
@@ -67,9 +70,12 @@
*/
public DeleteServerDialog( Shell parentShell,
Collection<Server> serversBeingDeleted ) {
- super(parentShell, I18n.DeleteServerDialogTitle, null, null,
MessageDialog.QUESTION, new String[] {
- IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
+ super(parentShell, I18n.DeleteServerDialogTitle,
Activator.getDefault().getImage(DNA_WINDOW_IMAGE_PATH), null,
+ MessageDialog.QUESTION, new String[] {IDialogConstants.OK_LABEL,
IDialogConstants.CANCEL_LABEL}, 0);
this.serversBeingDeleted = serversBeingDeleted;
+
+ // make sure dialog is resizable
+ setShellStyle(getShellStyle() | SWT.RESIZE);
}
//
===========================================================================================================================
@@ -86,17 +92,17 @@
protected void configureShell( Shell shell ) {
super.configureShell(shell);
- // now set title
- String title;
+ // now set message
+ String msg;
if (this.serversBeingDeleted.size() == 1) {
IDnaObject server = this.serversBeingDeleted.iterator().next();
- title = NLS.bind(I18n.DeleteServerDialogOneServerMsg, server.getName());
+ msg = NLS.bind(I18n.DeleteServerDialogOneServerMsg, server.getName());
} else {
- title = NLS.bind(I18n.DeleteServerDialogMultipleServersMsg,
this.serversBeingDeleted.size());
+ msg = NLS.bind(I18n.DeleteServerDialogMultipleServersMsg,
this.serversBeingDeleted.size());
}
- shell.setText(title);
+ this.message = msg;
}
/**
@@ -110,6 +116,9 @@
if (this.serversBeingDeleted.size() != 1) {
List serverList = new List(parent, SWT.NONE);
serverList.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+ GridData gd = new GridData(SWT.LEFT, SWT.CENTER, true, true);
+ gd.horizontalIndent = 40;
+ serverList.setLayoutData(gd);
for (IDnaObject server : this.serversBeingDeleted) {
serverList.add(server.getName());
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/i18n.properties)
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
(rev 0)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties 2009-07-08
16:11:59 UTC (rev 1076)
@@ -0,0 +1,103 @@
+#
+# JBoss DNA (
http://www.jboss.org/dna)
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+# See the AUTHORS.txt file in the distribution for a full listing of
+# individual contributors.
+#
+# JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
+# is licensed to you under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# JBoss DNA is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+#
+BasePublishingActionPublishingWizardErrorMsg = Unexpected error running the publishing
wizard. See log for more details.
+BasePublishingActionUnpublishingWizardErrorMsg = Unexpected error running the
unpublishing wizard. See log for more details.
+
+CollapseActionToolTip = Collapse All
+
+DeleteServerActionText = Delete Server
+DeleteServerActionToolTip = Delete server from the server registry
+
+DeleteServerDialogErrorsOccurredMsg = There were errors deleting servers from the server
registry. See log for more details.
+DeleteServerDialogMultipleServersMsg = Are you sure you want to delete these {0}
servers?
+DeleteServerDialogOneServerMsg = Are you sure you want to delete the "{0}"
server?
+DeleteServerDialogTitle = Confirm Delete Server
+
+EditServerActionText = Edit Server
+EditServerActionToolTip = Edit server properties
+
+ErrorDialogTitle = Error
+
+MissingImage = The following image cannot be found "{0}"
+
+NewServerActionText = New Server
+NewServerActionToolTip = Create and register a new server
+
+PublishOperationPublishTaskName = Publishing resources
+PublishOperationPublishTitle = Publish
+PublishOperationUnpublishTaskName = Unpublishing resources
+PublishOperationUnpublishTitle = Unpublish
+
+PublishPagePublishTitle = Publish the selected resources
+PublishPageLocationGroupTitle = Location
+PublishPageMissingRepositoryStatusMsg = A repository must be selected
+PublishPageMissingServerStatusMsg = A server must be selected
+PublishPageMissingWorkspaceStatusMsg = A workspace must be selected
+PublishPageNewServerButton = New...
+PublishPageNoAvailableRepositoriesStatusMsg = There are no repositories available on that
server
+PublishPageNoAvailableServersStatusMsg = A server must be created first
+PublishPageNoAvailableWorkspacesStatusMsg = There are no workspaces available on that
server and repository
+PublishPageNoResourcesToPublishStatusMsg = There are no files that can be published
+PublishPageNoResourcesToUnpublishStatusMsg = There are no files that can be unpublished
+PublishPagePublishOkStatusMsg = Choose the server, repository, and workspace where the
selected resources will be published.
+PublishPagePublishResourcesLabel = These resources will be published to the specified DNA
repository:
+PublishPageRecurseCheckBox = Recurse folders and projects
+PublishPageRecurseCheckBoxToolTip = Add all files under folders recursively under
selected projects and folders
+PublishPageRecurseProcessingErrorMsg = Unexpected error processing resources. See log for
more details.
+PublishPageRepositoryLabel = Repository:
+PublishPageRepositoryToolTip = The repository where the workspace is located
+PublishPageServerLabel = Server:
+PublishPageServerToolTip = The server where the repository is located
+PublishPageUnpublishOkStatusMsg = Choose the server, repository, and workspace where the
selected resources will be unpublished.
+PublishPageUnpublishResourcesLabel = These resources will be unpublished from the
specified DNA repository:
+PublishPageUnpublishTitle = Unpublish the selected resources
+PublishPageWorkspaceLabel = Workspace:
+PublishPageWorkspacePublishToolTip = The workspace where the resources are being
published
+PublishPageWorkspaceUnpublishToolTip = The workspace where the resources are being
unpublished
+
+PublishWizardPublishErrorMsg = Error Publishing
+PublishWizardPublishTitle = Publish
+PublishWizardUnpublishErrorMsg = Error Unpublishing
+PublishWizardUnpublishTitle = Unpublish
+
+ServerPageAuthenticationGroupTitle = Authentication
+ServerPageInvalidServerProperties = Cannot construct a server because all server
properties are not valid
+ServerPageOkStatusMsg = Define the server information where the DNA repositories are
located.
+ServerPagePasswordLabel = Password:
+ServerPagePasswordToolTip = The password used to authenticate the user when connecting to
the server
+ServerPageSavePasswordButton = Save password
+ServerPageSavePasswordLabel = Saved secret data is stored on your computer in a file
that's difficult, but not impossible, for an intruder to read.
+ServerPageSavePasswordToolTip = Indicates if the clear text password should be stored on
the local file system
+ServerPageTitle = Enter Server Information
+ServerPageUrlLabel = URL:
+ServerPageUrlToolTip = The URL used to connect to the server
+ServerPageUserLabel = User:
+ServerPageUserToolTip = The user login used when connecting to the server
+
+ServerViewToolTip = Manages the DNA server registry
+
+ServerWizardEditServerErrorMsg = There were errors editing a server. See log for more
details.
+ServerWizardEditServerTitle = Edit Server
+ServerWizardNewServerErrorMsg = There were errors creating a new server. See log for more
details.
+ServerWizardNewServerTitle = New Server
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/i18n.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views)
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerContentProvider.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,19 +21,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.views;
+package org.jboss.dna.web.jcr.rest.client.swt.views;
-import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
/**
* The ServerContentProvider is a content and label provider for DNA repositories.
@@ -41,7 +41,7 @@
* @author Dan Florian
* @since 0.6
*/
-public final class ServerContentProvider implements ITreeContentProvider, ILabelProvider
{
+public final class ServerContentProvider extends ColumnLabelProvider implements
ITreeContentProvider {
//
===========================================================================================================================
// Fields
@@ -163,10 +163,47 @@
assert (element instanceof IDnaObject);
return ((IDnaObject)element).getName();
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see
org.eclipse.jface.viewers.CellLabelProvider#getToolTipImage(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public Image getToolTipImage( Object object ) {
+ return getImage(object);
+ }
/**
* {@inheritDoc}
*
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public String getToolTipText( Object element ) {
+ if (element instanceof IDnaObject) {
+ return ((IDnaObject)element).getShortDescription();
+ }
+
+ return super.getToolTipText(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see
org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object)
+ * @since 0.6
+ */
+ @Override
+ public int getToolTipTimeDisplayed( Object object ) {
+ return 3000;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
* @since 0.6
*/
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/views/ServerView.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,13 +21,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.views;
+package org.jboss.dna.web.jcr.rest.client.swt.views;
-import static org.jboss.dna.publish.ui.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -40,15 +41,15 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.eclipse.ui.part.ViewPart;
-import org.jboss.dna.publish.IServerRegistryListener;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.ServerRegistryEvent;
-import org.jboss.dna.publish.domain.IDnaObject;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.actions.DeleteServerAction;
-import org.jboss.dna.publish.ui.swt.actions.EditServerAction;
-import org.jboss.dna.publish.ui.swt.actions.NewServerAction;
+import org.jboss.dna.web.jcr.rest.client.IServerRegistryListener;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent;
+import org.jboss.dna.web.jcr.rest.client.domain.IDnaObject;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.DeleteServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.EditServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.NewServerAction;
/**
* The ServerView shows all defined servers and their DNA repositories.
@@ -170,8 +171,11 @@
private void constructTreeViewer( Composite parent ) {
this.provider = new ServerContentProvider(getServerManager());
this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
+
this.viewer.setContentProvider(this.provider);
this.viewer.setLabelProvider(this.provider);
+ ColumnViewerToolTipSupport.enableFor(this.viewer);
+
this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged( SelectionChangedEvent event ) {
@@ -202,6 +206,8 @@
constructToolBar();
constructContextMenu();
+ setTitleToolTip(I18n.ServerViewToolTip);
+
// register to receive changes to the server registry
getServerManager().addRegistryListener(this);
}
@@ -254,7 +260,7 @@
/**
* {@inheritDoc}
*
- * @see
org.jboss.dna.publish.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.publish.ServerRegistryEvent)
+ * @see
org.jboss.dna.web.jcr.rest.client.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent)
* @since 0.6
*/
@Override
Copied:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards
(from rev 1074,
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards)
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishOperation.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishOperation.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
@@ -29,8 +29,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishPage.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import java.util.ArrayList;
import java.util.Collections;
@@ -52,22 +52,24 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.Repository;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.actions.NewServerAction;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.IServerRegistryListener;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.Repository;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.actions.NewServerAction;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
* @since 0.6
*/
-public final class PublishPage extends WizardPage implements ModifyListener {
+public final class PublishPage extends WizardPage implements IServerRegistryListener,
ModifyListener {
//
===========================================================================================================================
// Constants
@@ -421,7 +423,6 @@
@Override
public void widgetSelected( SelectionEvent e ) {
action.run();
- refreshServers();
}
});
@@ -433,6 +434,9 @@
btnNewServer.removeSelectionListener(this);
}
});
+
+ // register to receive server registry events that will be generated when the
new server dialog is run
+ getServerManager().addRegistryListener(this);
}
{ // row 2: repository row
@@ -546,6 +550,18 @@
}
/**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+ * @since 0.6
+ */
+ @Override
+ public void dispose() {
+ getServerManager().removeRegistryListener(this);
+ super.dispose();
+ }
+
+ /**
* @return the file to publish or unpublish (never <code>null</code>)
* @since 0.6
*/
@@ -876,6 +892,24 @@
/**
* {@inheritDoc}
*
+ * @see
org.jboss.dna.web.jcr.rest.client.IServerRegistryListener#serverRegistryChanged(org.jboss.dna.web.jcr.rest.client.ServerRegistryEvent)
+ * @since 0.6
+ */
+ @Override
+ public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
+ // should only be a new server event
+ if (event.isNew()) {
+ Server newServer = event.getServer();
+ this.servers.add(newServer);
+ this.cbxServer.add(newServer.getName());
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
* @since 0.6
*/
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/PublishWizard.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,8 +21,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE_PATH;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -31,13 +32,13 @@
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.Status.Severity;
-import org.jboss.dna.publish.domain.Workspace;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
-import org.jboss.dna.publish.ui.swt.wizards.PublishOperation.Type;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.Status.Severity;
+import org.jboss.dna.web.jcr.rest.client.domain.Workspace;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.swt.wizards.PublishOperation.Type;
/**
* @author Dan Florian
@@ -89,6 +90,7 @@
this.serverManager = serverManager;
setWindowTitle((type == Type.PUBLISH) ? I18n.PublishWizardPublishTitle :
I18n.PublishWizardUnpublishTitle);
+
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
}
//
===========================================================================================================================
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerPage.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,7 +21,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.WizardPage;
@@ -39,11 +39,11 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.domain.validation.ServerValidator;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.domain.validation.ServerValidator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/publish/ui/swt/wizards/ServerWizard.java 2009-07-07
18:53:08 UTC (rev 1074)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java 2009-07-08
16:11:59 UTC (rev 1076)
@@ -21,15 +21,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.dna.publish.ui.swt.wizards;
+package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE_PATH;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
-import org.jboss.dna.publish.ServerManager;
-import org.jboss.dna.publish.Status;
-import org.jboss.dna.publish.domain.Server;
-import org.jboss.dna.publish.ui.swt.Activator;
-import org.jboss.dna.publish.ui.swt.I18n;
+import org.jboss.dna.web.jcr.rest.client.ServerManager;
+import org.jboss.dna.web.jcr.rest.client.Status;
+import org.jboss.dna.web.jcr.rest.client.domain.Server;
+import org.jboss.dna.web.jcr.rest.client.swt.Activator;
+import org.jboss.dna.web.jcr.rest.client.swt.I18n;
/**
* @author Dan Florian
@@ -75,6 +76,8 @@
public ServerWizard( ServerManager serverManager ) {
this.page = new ServerPage();
this.serverManager = serverManager;
+
+
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
setWindowTitle(I18n.ServerWizardNewServerTitle);
}