Author: elvisisking
Date: 2009-08-19 12:26:03 -0400 (Wed, 19 Aug 2009)
New Revision: 1169
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/about.ini
branches/eclipse/org.jboss.dna.publish.ui.swt/about.mappings
branches/eclipse/org.jboss.dna.publish.ui.swt/about.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaConsole.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaServerView.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaToc.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/PublishDialog.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ResourceContextMenu.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ServerDialog.html
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/helpContexts.xml
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/DnaConsole.png
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/PublishDialog.png
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ResourceDnaContextMenu.png
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerDialog.png
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerView.png
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/collapse_all.gif
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/delete_server.gif
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/edit_server.gif
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/new_server.gif
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/refresh.gif
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/toc.xml
branches/eclipse/org.jboss.dna.publish.ui.swt/feature.png
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/error_overlay.gif
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.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/Activator.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/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/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/PublishJob.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:
Added first cut at dynamic help. Now feature shows up in About dialog. Added an image
decorator that indicates when a server can't be connected to.
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/about.ini
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/about.ini (rev
0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/about.ini 2009-08-19 16:26:03 UTC (rev
1169)
@@ -0,0 +1,21 @@
+# 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.
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog
(translated)
+aboutText=%featureText
+
+aboutImage=icons/views/dna_icon_16x.png
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=feature.png
+
+# Property "appName" contains name of the application (translated)
+appName=%featureName
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/about.ini
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/about.mappings
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/about.mappings
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/about.mappings 2009-08-19 16:26:03 UTC
(rev 1169)
@@ -0,0 +1,3 @@
+#Thu Feb 26 11:28:46 CST 2009
+1=
+0=3126
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/about.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/about.properties
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/about.properties 2009-08-19 16:26:03 UTC
(rev 1169)
@@ -0,0 +1,15 @@
+# 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.
+
+featureText=DNA REST Client\n\
+Version: 1.0\n\
+\n\
+(c) 2000-2009 MetaMatrix, Inc. and Red Hat, Inc.\n\
+\n\
+Visit
http://www.jboss.org/dna/
+
+featureName=DNA REST Client
+
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/about.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-08-19 16:07:34 UTC
(rev 1168)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/build.properties 2009-08-19 16:26:03 UTC
(rev 1169)
@@ -13,7 +13,13 @@
LEGAL.txt,\
AUTHORS.txt,\
dna-web-jcr-rest-client-0.6-SNAPSHOT-jar-with-dependencies.jar,\
- src/log4j.properties
+ src/log4j.properties,\
+ docs/helpContexts.xml,\
+ docs/,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ feature.png
src.includes = src/,\
LEGAL.txt
source.dnaPublishUi.jar = src/
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaConsole.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaConsole.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaConsole.html 2009-08-19 16:26:03
UTC (rev 1169)
@@ -0,0 +1,35 @@
+<h2>DNA Console</h2>
+
+<p>The DNA Console is shown in the Workbench Console view. Entries in this view
show the output of the publishing or unpublishing operations. For each operation there is
an entry at the start of the operation and another entry at the end of the operation.
Inbetween those entries will be an entry for each file involved in the
operation.</p>
+
+<p>The following symbols indicate the type of outcome for each file:</p>
+
+<table border="1">
+<tr>
+ <td align="center"><strong>+</strong> </td>
+ <td>if the file was successfully published (uploaded)</td>
+</tr>
+<tr>
+ <td align="center"><strong>-</strong> </td>
+ <td>if the file was successfully unpublished (removed)</td>
+</tr>
+<tr>
+ <td align="center"><strong>*</strong> </td>
+ <td>if there was an error publishing or unpublishing the file</td>
+</tr>
+<tr>
+ <td align="center"><strong>w</strong> </td>
+ <td>if there is a warning when publishing or unpublishing a file (like trying to
unpublish a file that was never unpublished)</td>
+</tr>
+</table>
+
+<p>Here is what the DNA Console in the Console view looks like:</p>
+
+<img src="images/DnaConsole.png" width="610"
height="168" border="0" alt="">
+
+<p>There are view toolbar buttons to clear the console, scroll lock, pin the
console, display a different console, and to open another DNA Console.</p>
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="PublishDialog.html">Publishing and Unpublishing
Dialog</a></li>
+</ul>
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaConsole.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaServerView.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaServerView.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaServerView.html 2009-08-19
16:26:03 UTC (rev 1169)
@@ -0,0 +1,15 @@
+<h2>Server View</h2>
+
+<p>The DNA Server View displays the registered servers hosting DNA repositories.
For each server, the repositories and repository workspaces are also displayed. There are
view toolbar buttons to create a new server (<img src="images/new_server.gif"
width="16" height="16" border="0" alt="">),
edit a selected server's properties (<img src="images/edit_server.gif"
width="16" height="16" border="0" alt="">),
delete one or more selected servers (<img src="images/delete_server.gif"
width="16" height="16" border="0" alt="">),
refresh, which attempts to connect to all the selected servers (<img
src="images/refresh.gif" width="16" height="16"
border="0" alt="">), and collapse all servers so that their
repositories and workspaces can't be seen (<img
src="images/collapse_all.gif" width="16" height="16"
border="0" alt="">).</p>
+
+<p>Here is what the DNA Server View looks like:</p>
+
+<img src="images/ServerView.png" width="532"
height="166" border="0" alt="">
+
+<p>If a connection to a server cannot be established that server icon will be
decorated with an error overlay image. There is also a context menu with actions to create
a new server (always enabled), edit server properties (enabled only when one server is
selected), and delete one or more selected servers.</p>
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="ServerDialog.html">Server Dialog</a></li>
+</ul>
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaServerView.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaToc.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaToc.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaToc.html 2009-08-19 16:26:03 UTC
(rev 1169)
@@ -0,0 +1,9 @@
+<h2>DNA Publishing</h2>
+
+<ul>
+<li><a href="ResourceContextMenu.html">Resource Context
Menu</a></li>
+<li><a href="PublishDialog.html">Publish/Unpublish
Dialog</a></li>
+<li><a href="ServerDialog.html">Server Dialog</a></li>
+<li><a href="DnaServerView.html">Server View</a></li>
+<li><a href="DnaConsole.html">DNA Message
Console</a></li>
+</ul>
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/DnaToc.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/PublishDialog.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/PublishDialog.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/PublishDialog.html 2009-08-19
16:26:03 UTC (rev 1169)
@@ -0,0 +1,45 @@
+<h2>Publish/Unpublish Dialog</h2>
+
+<p>The DNA Publish/Unpublish Dialog is used to publish or unpublish workspace
selected files and folders to/from DNA repository workspaces. When publishing, the
selected files will be uploaded to the selected DNA repository workspace. When
unpublishing, the selected files will be removed from the selected DNA repository
workspace (if they exist there).</p>
+
+<p>The dialog consists of the following controls:</p>
+
+<table border="1">
+<tr>
+ <td align="right"><strong>Server
Combo</strong> </td>
+ <td>allows selection of a registered server</td>
+</tr>
+<tr>
+ <td align="right"><strong>New Server
Button</strong> </td>
+ <td>use to create and register a new server that is hosting a DNA
repository</td>
+</tr>
+<tr>
+ <td align="right"><strong>Repository
Combo</strong> </td>
+ <td>allows selection of a repository found hosted on the selected
server</td>
+</tr>
+<tr>
+ <td align="right"><strong>Workspace
Combo</strong> </td>
+ <td>allows selection of a workspace of the selected repository</td>
+</tr>
+<tr>
+ <td align="right"><strong>Resources
List</strong> </td>
+ <td>a list of all the selected files that will be published or
unpublished</td>
+</tr>
+<tr>
+ <td align="right"><strong>Recurse
Checkbox</strong> </td>
+ <td>when checked will recursively select all files within any selected
folders</td>
+</tr>
+</table>
+
+<p>Here is what the DNA Publish/Unpublish Dialog looks like:</p>
+
+<img src="images/PublishDialog.png" width="525"
height="405" border="0" alt="">
+
+<p>A server must be selected before a repository can be selected. Likewise, a
repository must be selected before a workspace can be selected. The message area at the
top of the dialog will indicate the type of operation (publish or unpublish) and if there
is any missing information. Once the workspace has been selected the 'Finish'
button will be enabled and the operation can be executed. These operations can be run in
the background so that multiple operations can be run at the same time. The DNA Message
Console displays output from the operations.</p>
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="ServerDialog.html">Server Dialog</a></li>
+<li><a href="DnaConsole.html">DNA Message
Console</a></li>
+</ul>
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/PublishDialog.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ResourceContextMenu.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ResourceContextMenu.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ResourceContextMenu.html 2009-08-19
16:26:03 UTC (rev 1169)
@@ -0,0 +1,13 @@
+<h2>Resource Context Menu</h2>
+
+<p>The Resource Context Menu consists of two actions: publish and unpublish. Each
action will be enabled when one or more resources (i.e, project, folder, or file) in the
workspace are selected. When publishing, the selected resources will be uploaded to a DNA
repository workspace. When unpublishing, the selected resources will be removed from a
selected DNA repository workspace (if they exist there).</p>
+
+<p>Here is what the Resource Context Menu looks like:</p>
+
+<img src="images/ResourceDnaContextMenu.png" width="358"
height="118" border="0" alt="">
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="PublishDialog.html">Publishing and Unpublishing
Dialog</a></li>
+</ul>
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ResourceContextMenu.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ServerDialog.html
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ServerDialog.html
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ServerDialog.html 2009-08-19
16:26:03 UTC (rev 1169)
@@ -0,0 +1,41 @@
+<h2>Server Dialog</h2>
+
+<p>The DNA Server Dialog is used to create and register new servers that host DNA
repositories. This dialog is also used to edit an existing server's
properties.</p>
+
+<p>The dialog consists of the following controls:</p>
+
+<table border="1">
+<tr>
+ <td align="right"><strong>URL
Field</strong> </td>
+ <td>enter the server URL where one or more DNA repositories are hosted</td>
+</tr>
+<tr>
+ <td align="right"><strong>User
Field</strong> </td>
+ <td>enter the name of the user that will be used when logging in to the
server</td>
+</tr>
+<tr>
+ <td align="right"><strong>Password
Field</strong> </td>
+ <td>enter the password to use when logging in to the server</td>
+</tr>
+<tr>
+ <td align="right"><strong>Save Password
Checkbox</strong> </td>
+ <td>when checked the password will be saved in clear-text on the local
machined</td>
+</tr>
+<tr>
+ <td align="right"><strong>Test Server Connection
Button</strong> </td>
+ <td>when clicked will try and connect to the server</td>
+</tr>
+</table>
+
+<p>Here is what the DNA Server Dialog looks like:</p>
+
+<img src="images/ServerDialog.png" width="525"
height="515" border="0" alt="">
+
+<p>Once all server properties have been entered the 'Finish' button will be
enabled and the new server can be created or the existing server's properties can be
modified. You can display the Server Dialog from the Server View and from the
Publish/Unpublish Dialog.</p>
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="DnaServerView.html">Server View</a></li>
+<li><a href="PublishDialog.html">Publishing and Unpublishing
Dialog</a></li>
+</ul>
\ No newline at end of file
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/ServerDialog.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/helpContexts.xml
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/helpContexts.xml
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/helpContexts.xml 2009-08-19
16:26:03 UTC (rev 1169)
@@ -0,0 +1,27 @@
+<!--
+ 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.
+-->
+<contexts>
+ <context id="serverViewHelpContext" title="DNA Server View">
+ <description>Ther DNA Server View shows all registered servers and their
repositories and workspaces.</description>
+ <topic href="docs/DnaServerView.html" label="DNA Server
View"/>
+ <topic href="docs/ServerDialog.html" label="Server
Dialog"/>
+ </context>
+ <context id="serverDialogHelpContext" title="Server Dialog">
+ <description>The DNA Server Dialog allows you to edit or create a server that
hosts one or more DNA repositories.</description>
+ <topic href="docs/ServerDialog.html" label="Server
Dialog"/>
+ </context>
+ <context id="publishDialogHelpContext" title="DNA Publish and
Unpublish Dialog Help">
+ <description>The DNA Publish/Unpublish Dialog uploads or removes selected
resources from a selected DNA server.</description>
+ <topic href="docs/PublishDialog.html" label="Publish/Unpublish
Dialog"/>
+ <topic href="docs/ServerDialog.html" label="Create a new
server"/>
+ </context>
+ <context id="dnaConsoleHelpContext" title="DNA Message
Console">
+ <description>The DNA Message Console contains the output from the publishing
and unpublishing operations.</description>
+ <topic href="docs/DnaConsole.html" label="DNA Message
Console"/>
+ </context>
+</contexts>
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/helpContexts.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/DnaConsole.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/DnaConsole.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/PublishDialog.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/PublishDialog.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ResourceDnaContextMenu.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ResourceDnaContextMenu.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerDialog.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerDialog.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerView.png
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/ServerView.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/collapse_all.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/collapse_all.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/delete_server.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/delete_server.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/edit_server.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/edit_server.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/new_server.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/new_server.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/refresh.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/docs/images/refresh.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/toc.xml
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/docs/toc.xml
(rev 0)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/docs/toc.xml 2009-08-19 16:26:03 UTC
(rev 1169)
@@ -0,0 +1,7 @@
+<toc label="DNA Publishing">
+ <topic label="Publishing/Unpublishing Dialog"
href="docs/PublishDialog.html"/>
+ <topic label="Server View" href="docs/DnaServerView.html"/>
+ <topic label="Server Dialog"
href="docs/ServerDialog.html"/>
+ <topic label="DNA Console" href="docs/DnaConsole.html"/>
+ <topic label="Resource Context Menu"
href="docs/ResourceContextMenu.html"/>
+</toc>
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/docs/toc.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/feature.png
===================================================================
(Binary files differ)
Property changes on: branches/eclipse/org.jboss.dna.publish.ui.swt/feature.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/error_overlay.gif
===================================================================
(Binary files differ)
Property changes on:
branches/eclipse/org.jboss.dna.publish.ui.swt/icons/views/error_overlay.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.properties
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.properties 2009-08-19 16:07:34
UTC (rev 1168)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.properties 2009-08-19 16:26:03
UTC (rev 1169)
@@ -24,6 +24,8 @@
bundleName = DNA Eclipse Publishing UI Plug-in
bundleVendor = Red Hat, Inc.
contextMenu.label = DNA
+decorator.description = Decorates DNA objects in the Server View
+decorator.label = DNA Server View Decorator
dnaCategory = DNA
publishAction.label = Publish
serverView = DNA Servers
Modified: branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml
===================================================================
--- branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-08-19 16:07:34 UTC (rev
1168)
+++ branches/eclipse/org.jboss.dna.publish.ui.swt/plugin.xml 2009-08-19 16:26:03 UTC (rev
1169)
@@ -78,4 +78,36 @@
</view>
</extension>
+<!-- Server view decorator -->
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ lightweight="true"
+ location="BOTTOM_LEFT"
+ adaptable="true"
+ label="%decorator.label"
+ state="true"
+
class="org.jboss.dna.web.jcr.rest.client.swt.views.ServerContentProvider"
+ id="dnaDecorator">
+ <description>
+ %decorator.description
+ </description>
+ <enablement>
+ <objectClass
+
name="org.jboss.dna.web.jcr.rest.client.domain.IDnaObject">
+ </objectClass>
+ </enablement>
+ </decorator>
+ </extension>
+
+<!-- Context Help -->
+ <extension point="org.eclipse.help.contexts">
+ <contexts file="docs/helpContexts.xml" />
+ </extension>
+
+<!-- Help Table of Contents -->
+ <extension point="org.eclipse.help.toc">
+ <toc file="docs/toc.xml" primary="true" />
+ </extension>
+
</plugin>
Modified:
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/Activator.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Activator.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -163,11 +163,11 @@
String key = null;
if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
+ key = WORKSPACE_IMAGE;
} else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
+ key = REPOSITORY_IMAGE;
} else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
+ key = SERVER_IMAGE;
} else if (object instanceof IDnaObject) {
// should have an icon for every business object
assert false;
@@ -205,11 +205,11 @@
String key = null;
if (object instanceof Workspace) {
- key = WORKSPACE_IMAGE_PATH;
+ key = WORKSPACE_IMAGE;
} else if (object instanceof Repository) {
- key = REPOSITORY_IMAGE_PATH;
+ key = REPOSITORY_IMAGE;
} else if (object instanceof Server) {
- key = SERVER_IMAGE_PATH;
+ key = SERVER_IMAGE;
} else if (object instanceof IDnaObject) {
// should have an icon for every business object
assert false;
Modified:
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/IUiConstants.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/IUiConstants.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -35,50 +35,66 @@
*/
String PLUGIN_ID = "org.jboss.dna.web.jcr.rest.client.swt"; //$NON-NLS-1$
- String ICON_PATH = "icons/"; //$NON-NLS-1$
+ String ICON_FOLDER = "icons/"; //$NON-NLS-1$
//
// /icons/objects/
//
- String OBJECT_ICONS_FOLDER = ICON_PATH + "objects/"; //$NON-NLS-1$
+ String OBJECT_ICONS_FOLDER = ICON_FOLDER + "objects/"; //$NON-NLS-1$
- String CHECKMARK_IMAGE_PATH = OBJECT_ICONS_FOLDER + "checkmark.gif";
//$NON-NLS-1$
+ String CHECKMARK_IMAGE = OBJECT_ICONS_FOLDER + "checkmark.gif";
//$NON-NLS-1$
- String REPOSITORY_IMAGE_PATH = OBJECT_ICONS_FOLDER + "repository.gif";
//$NON-NLS-1$
+ String REPOSITORY_IMAGE = OBJECT_ICONS_FOLDER + "repository.gif";
//$NON-NLS-1$
- String SERVER_IMAGE_PATH = OBJECT_ICONS_FOLDER + "server.gif";
//$NON-NLS-1$
+ String SERVER_IMAGE = OBJECT_ICONS_FOLDER + "server.gif"; //$NON-NLS-1$
- String WORKSPACE_IMAGE_PATH = OBJECT_ICONS_FOLDER + "workspace.gif";
//$NON-NLS-1$
+ String WORKSPACE_IMAGE = OBJECT_ICONS_FOLDER + "workspace.gif";
//$NON-NLS-1$
//
// /icons/views/
//
- String VIEWS_ICON_FOLDER = ICON_PATH + "views/"; //$NON-NLS-1$
+ String VIEWS_ICON_FOLDER = ICON_FOLDER + "views/"; //$NON-NLS-1$
- String COLLAPSE_ALL_IMAGE_PATH = VIEWS_ICON_FOLDER + "collapse_all.gif";
//$NON-NLS-1$
+ String COLLAPSE_ALL_IMAGE = VIEWS_ICON_FOLDER + "collapse_all.gif";
//$NON-NLS-1$
- String DELETE_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "delete_server.gif";
//$NON-NLS-1$
+ String DELETE_SERVER_IMAGE = VIEWS_ICON_FOLDER + "delete_server.gif";
//$NON-NLS-1$
String DNA_IMAGE_16x = VIEWS_ICON_FOLDER + "dna_icon_16x.png";
//$NON-NLS-1$
- String EDIT_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "edit_server.gif";
//$NON-NLS-1$
+ String EDIT_SERVER_IMAGE = VIEWS_ICON_FOLDER + "edit_server.gif";
//$NON-NLS-1$
- String NEW_SERVER_IMAGE_PATH = VIEWS_ICON_FOLDER + "new_server.gif";
//$NON-NLS-1$
+ String ERROR_OVERLAY_IMAGE = VIEWS_ICON_FOLDER + "error_overlay.gif";
//$NON-NLS-1$
- String PUBLISH_IMAGE_PATH = VIEWS_ICON_FOLDER + "publish.png";
//$NON-NLS-1$
+ String NEW_SERVER_IMAGE = VIEWS_ICON_FOLDER + "new_server.gif";
//$NON-NLS-1$
- String REFRESH_IMAGE_PATH = VIEWS_ICON_FOLDER + "refresh.gif";
//$NON-NLS-1$
+ String PUBLISH_IMAGE = VIEWS_ICON_FOLDER + "publish.png"; //$NON-NLS-1$
- String UNPUBLISH_IMAGE_PATH = VIEWS_ICON_FOLDER + "unpublish.png";
//$NON-NLS-1$
+ String REFRESH_IMAGE = VIEWS_ICON_FOLDER + "refresh.gif"; //$NON-NLS-1$
+ String UNPUBLISH_IMAGE = VIEWS_ICON_FOLDER + "unpublish.png";
//$NON-NLS-1$
+
//
// /icons/wizards/
//
- String WIZARD_ICONS_FOLDER = ICON_PATH + "wizards/"; //$NON-NLS-1$
+ String WIZARD_ICONS_FOLDER = ICON_FOLDER + "wizards/"; //$NON-NLS-1$
- String DNA_WIZARD_BANNER_IMAGE_PATH = WIZARD_ICONS_FOLDER +
"dna_wizard_banner.gif"; //$NON-NLS-1$
+ String DNA_WIZARD_BANNER_IMAGE = WIZARD_ICONS_FOLDER +
"dna_wizard_banner.gif"; //$NON-NLS-1$
+
+ //
+ // Help Contexts
+ //
+
+ String HELP_CONTEXT_PREFIX = PLUGIN_ID + '.';
+
+ String DNA_CONSOLE_HELP_CONTEXT = HELP_CONTEXT_PREFIX +
"dnaConsoleHelpContext"; //$NON-NLS-1$
+
+ String PUBLISH_DIALOG_HELP_CONTEXT = HELP_CONTEXT_PREFIX +
"publishDialogHelpContext"; //$NON-NLS-1$
+
+ String SERVER_DIALOG_HELP_CONTEXT = HELP_CONTEXT_PREFIX +
"serverDialogHelpContext"; //$NON-NLS-1$
+
+ String SERVER_VIEW_HELP_CONTEXT = HELP_CONTEXT_PREFIX +
"serverViewHelpContext"; //$NON-NLS-1$
}
Modified:
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/Utils.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/Utils.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -24,6 +24,7 @@
package org.jboss.dna.web.jcr.rest.client.swt;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@@ -135,6 +136,27 @@
return null;
}
+ /**
+ * The image can be used to decorate an existing image.
+ *
+ * @param status the status whose image overlay is being requested
+ * @return the image descriptor or <code>null</code> if none found for
the status severity
+ * @since 0.6
+ */
+ public static ImageDescriptor getOverlayImage( Status status ) {
+ String imageId = null;
+
+ if (status.isError()) {
+ imageId = IUiConstants.ERROR_OVERLAY_IMAGE;
+ }
+
+ if (imageId != null) {
+ return Activator.getDefault().getImageDescriptor(imageId);
+ }
+
+ return null;
+ }
+
//
===========================================================================================================================
// Constructors
//
===========================================================================================================================
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/web/jcr/rest/client/swt/actions/DeleteServerAction.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/DeleteServerAction.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,7 +23,7 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.actions;
-import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DELETE_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DELETE_SERVER_IMAGE;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.dialogs.Dialog;
@@ -84,7 +84,7 @@
ServerManager serverManager ) {
super(RestClientI18n.deleteServerActionText.text());
setToolTipText(RestClientI18n.deleteServerActionToolTip.text());
-
setImageDescriptor(Activator.getDefault().getImageDescriptor(DELETE_SERVER_IMAGE_PATH));
+
setImageDescriptor(Activator.getDefault().getImageDescriptor(DELETE_SERVER_IMAGE));
setEnabled(false);
this.serversToDelete = new ArrayList<Server>(5);
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/web/jcr/rest/client/swt/actions/EditServerAction.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/EditServerAction.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -24,7 +24,7 @@
package org.jboss.dna.web.jcr.rest.client.swt.actions;
import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_IMAGE_16x;
-import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.EDIT_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.EDIT_SERVER_IMAGE;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
@@ -80,7 +80,7 @@
ServerManager serverManager ) {
super(RestClientI18n.editServerActionText.text());
setToolTipText(RestClientI18n.editServerActionToolTip.text());
-
setImageDescriptor(Activator.getDefault().getImageDescriptor(EDIT_SERVER_IMAGE_PATH));
+
setImageDescriptor(Activator.getDefault().getImageDescriptor(EDIT_SERVER_IMAGE));
setEnabled(false);
this.shell = shell;
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/web/jcr/rest/client/swt/actions/NewServerAction.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/actions/NewServerAction.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -24,7 +24,7 @@
package org.jboss.dna.web.jcr.rest.client.swt.actions;
import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_IMAGE_16x;
-import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.NEW_SERVER_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.NEW_SERVER_IMAGE;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
@@ -72,7 +72,7 @@
ServerManager serverManager ) {
super(RestClientI18n.newServerActionText.text());
setToolTipText(RestClientI18n.newServerActionToolTip.text());
-
setImageDescriptor(Activator.getDefault().getImageDescriptor(NEW_SERVER_IMAGE_PATH));
+ setImageDescriptor(Activator.getDefault().getImageDescriptor(NEW_SERVER_IMAGE));
this.shell = shell;
this.serverManager = serverManager;
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/web/jcr/rest/client/swt/views/ServerContentProvider.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerContentProvider.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,12 +23,16 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.views;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
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;
@@ -38,13 +42,14 @@
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.RestClientI18n;
+import org.jboss.dna.web.jcr.rest.client.swt.Utils;
/**
* The <code>ServerContentProvider</code> is a content and label provider for
DNA repositories.
*
* @since 0.6
*/
-public final class ServerContentProvider extends ColumnLabelProvider implements
ITreeContentProvider {
+public final class ServerContentProvider extends ColumnLabelProvider implements
ILightweightLabelDecorator, ITreeContentProvider {
//
===========================================================================================================================
// Fields
@@ -57,23 +62,15 @@
*/
private final ServerManager serverManager;
- /**
- * The viewer using this content provider.
- *
- * @since 0.6
- */
- private Viewer viewer;
-
//
===========================================================================================================================
// Constructors
//
===========================================================================================================================
/**
- * @param serverManager the server manager being used to find servers, repositories,
and workspaces
* @since 0.6
*/
- public ServerContentProvider( ServerManager serverManager ) {
- this.serverManager = serverManager;
+ public ServerContentProvider() {
+ this.serverManager = Activator.getDefault().getServerManager();
}
//
===========================================================================================================================
@@ -94,6 +91,45 @@
/**
* {@inheritDoc}
*
+ * @see
org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object,
org.eclipse.jface.viewers.IDecoration)
+ * @since 0.6
+ */
+ @Override
+ public void decorate( final Object element,
+ IDecoration decoration ) {
+ final Display display = Display.getDefault();
+
+ if (display.isDisposed()) {
+ return;
+ }
+
+ // must be an IDnaObject
+ if (element instanceof Server) {
+ Status status =
Activator.getDefault().getServerManager().ping((Server)element);
+
+ if (status.isError()) {
+ ImageDescriptor overlay = Utils.getOverlayImage(status);
+
+ if (overlay != null) {
+ decoration.addOverlay(overlay);
+ }
+ }
+
+ display.asyncExec(new Runnable() {
+ @SuppressWarnings( "synthetic-access" )
+ @Override
+ public void run() {
+ if (!display.isDisposed()) {
+ fireLabelProviderChanged(new
LabelProviderChangedEvent(ServerContentProvider.this, element));
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
* @since 0.6
*/
@@ -119,10 +155,6 @@
} catch (Exception e) {
String msg =
RestClientI18n.serverManagerGetRepositoriesExceptionMsg.text(((Server)parentElement).getShortDescription());
Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
-
- if (this.viewer.getControl().isVisible()) {
- MessageDialog.openError(this.viewer.getControl().getShell(),
RestClientI18n.errorDialogTitle.text(), msg);
- }
}
try {
@@ -132,10 +164,6 @@
} catch (Exception e) {
String msg = RestClientI18n.serverManagerGetWorkspacesExceptionMsg.text();
Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
-
- if (this.viewer.getControl().isVisible()) {
- MessageDialog.openError(this.viewer.getControl().getShell(),
RestClientI18n.errorDialogTitle.text(), msg);
- }
}
return new Object[0];
@@ -256,7 +284,7 @@
public void inputChanged( Viewer viewer,
Object oldInput,
Object newInput ) {
- this.viewer = viewer;
+ // nothing to do
}
/**
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/web/jcr/rest/client/swt/views/ServerView.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/views/ServerView.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,15 +23,18 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.views;
-import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.COLLAPSE_ALL_IMAGE_PATH;
-import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.REFRESH_IMAGE_PATH;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.COLLAPSE_ALL_IMAGE;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.REFRESH_IMAGE;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.SERVER_VIEW_HELP_CONTEXT;
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.DecoratingLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -41,6 +44,7 @@
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.part.ViewPart;
import org.jboss.dna.web.jcr.rest.client.IServerRegistryListener;
import org.jboss.dna.web.jcr.rest.client.ServerManager;
@@ -127,18 +131,24 @@
};
this.collapseAllAction.setToolTipText(RestClientI18n.collapseActionToolTip.text());
-
this.collapseAllAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(COLLAPSE_ALL_IMAGE_PATH));
+
this.collapseAllAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(COLLAPSE_ALL_IMAGE));
// the refresh action is always enabled
this.refreshAction = new Action() {
@Override
public void run() {
- getViewer().refresh();
+ IStructuredSelection selection =
(IStructuredSelection)getViewer().getSelection();
+
+ if (selection.size() == 1) {
+ getViewer().refresh(selection.getFirstElement());
+ } else {
+ getViewer().refresh();
+ }
}
};
this.refreshAction.setToolTipText(RestClientI18n.refreshActionToolTip.text());
-
this.refreshAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(REFRESH_IMAGE_PATH));
+
this.refreshAction.setImageDescriptor(Activator.getDefault().getImageDescriptor(REFRESH_IMAGE));
// the shell used for dialogs that the actions display
Shell shell = this.getSite().getShell();
@@ -188,11 +198,12 @@
* @since 0.6
*/
private void constructTreeViewer( Composite parent ) {
- this.provider = new ServerContentProvider(getServerManager());
+ this.provider = new ServerContentProvider();
this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
this.viewer.setContentProvider(this.provider);
- this.viewer.setLabelProvider(this.provider);
+ ILabelDecorator decorator =
Activator.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
+ this.viewer.setLabelProvider(new DecoratingLabelProvider(this.provider,
decorator));
ColumnViewerToolTipSupport.enableFor(this.viewer);
this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -229,6 +240,10 @@
// register to receive changes to the server registry
getServerManager().addRegistryListener(this);
+
+ // register with the help system
+ IWorkbenchHelpSystem helpSystem =
Activator.getDefault().getWorkbench().getHelpSystem();
+ helpSystem.setHelp(parent, SERVER_VIEW_HELP_CONTEXT);
}
/**
Modified:
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishJob.java
===================================================================
---
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishJob.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishJob.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,6 +23,7 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.PLUGIN_ID;
import java.io.File;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -39,7 +40,6 @@
import org.jboss.dna.web.jcr.rest.client.Status;
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.IUiConstants;
import org.jboss.dna.web.jcr.rest.client.swt.RestClientI18n;
/**
@@ -79,7 +79,7 @@
*
* @since 0.6
*/
- private static final String CONSOLE_NAME =
RestClientI18n.publishJobConsoleName.text();
+ static final String CONSOLE_NAME = RestClientI18n.publishJobConsoleName.text();
//
===========================================================================================================================
// Class Methods
@@ -246,7 +246,7 @@
msg = RestClientI18n.publishJobUnexpectedErrorMsg.text();
}
- return new org.eclipse.core.runtime.Status(IStatus.ERROR,
IUiConstants.PLUGIN_ID, msg, e);
+ return new org.eclipse.core.runtime.Status(IStatus.ERROR, PLUGIN_ID, msg,
e);
} finally {
monitor.done();
// add done msg
@@ -327,7 +327,7 @@
// create DNA console if necessary
if (console == null) {
- console = new MessageConsole(CONSOLE_NAME, null);
+ console = new DnaConsole();
consoleMgr.addConsoles(new IConsole[] {console});
}
@@ -339,4 +339,16 @@
out.println(message);
}
+ //
===========================================================================================================================
+ // Inner Class
+ //
===========================================================================================================================
+
+ class DnaConsole extends MessageConsole {
+
+ public DnaConsole() {
+ super(CONSOLE_NAME, null);
+ }
+
+ }
+
}
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/web/jcr/rest/client/swt/wizards/PublishPage.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishPage.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,6 +23,7 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.PUBLISH_DIALOG_HELP_CONTEXT;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -52,6 +53,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
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;
@@ -543,7 +545,11 @@
this.cbxRepository.addModifyListener(this);
this.cbxServer.addModifyListener(this);
this.cbxWorkspace.addModifyListener(this);
-
+
+ // register with the help system
+ IWorkbenchHelpSystem helpSystem =
Activator.getDefault().getWorkbench().getHelpSystem();
+ helpSystem.setHelp(pnlMain, PUBLISH_DIALOG_HELP_CONTEXT);
+
// load the UI with data
refreshServers();
}
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/web/jcr/rest/client/swt/wizards/PublishWizard.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/PublishWizard.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,7 +23,7 @@
*/
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 static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -90,7 +90,7 @@
this.serverManager = serverManager;
setWindowTitle((type == Type.PUBLISH) ?
RestClientI18n.publishWizardPublishTitle.text() :
RestClientI18n.publishWizardUnpublishTitle.text());
-
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
+
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE));
}
//
===========================================================================================================================
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/web/jcr/rest/client/swt/wizards/ServerPage.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerPage.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,6 +23,7 @@
*/
package org.jboss.dna.web.jcr.rest.client.swt.wizards;
+import static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.SERVER_DIALOG_HELP_CONTEXT;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -43,10 +44,12 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
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.Activator;
import org.jboss.dna.web.jcr.rest.client.swt.RestClientI18n;
/**
@@ -311,6 +314,10 @@
constructAuthenticationPanel(pnlMain);
constructTestConnectionPanel(pnlMain);
setControl(pnlMain);
+
+ // register with the help system
+ IWorkbenchHelpSystem helpSystem =
Activator.getDefault().getWorkbench().getHelpSystem();
+ helpSystem.setHelp(pnlMain, SERVER_DIALOG_HELP_CONTEXT);
}
/**
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/web/jcr/rest/client/swt/wizards/ServerWizard.java 2009-08-19
16:07:34 UTC (rev 1168)
+++
branches/eclipse/org.jboss.dna.publish.ui.swt/src/org/jboss/dna/web/jcr/rest/client/swt/wizards/ServerWizard.java 2009-08-19
16:26:03 UTC (rev 1169)
@@ -23,7 +23,7 @@
*/
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 static
org.jboss.dna.web.jcr.rest.client.swt.IUiConstants.DNA_WIZARD_BANNER_IMAGE;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
import org.jboss.dna.web.jcr.rest.client.ServerManager;
@@ -76,7 +76,7 @@
this.page = new ServerPage();
this.serverManager = serverManager;
-
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE_PATH));
+
setDefaultPageImageDescriptor(Activator.getDefault().getImageDescriptor(DNA_WIZARD_BANNER_IMAGE));
setWindowTitle(RestClientI18n.serverWizardNewServerTitle.text());
}