JBoss Tools SVN: r15236 - in trunk/examples/plugins/org.jboss.tools.project.examples: schema and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-05-12 16:02:47 -0400 (Tue, 12 May 2009)
New Revision: 15236
Added:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IProjectExampleSite.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleSite.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
trunk/examples/plugins/org.jboss.tools.project.examples/schema/projectExamplesXml.exsd
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4292 Users should be able to add example sites without adding a plugin (externalized)
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties 2009-05-12 20:02:47 UTC (rev 15236)
@@ -4,4 +4,7 @@
JBoss_Tools_category = JBoss Tools
Project_Examples_wizard = Project Examples
Project_Examples_command =Project Examples...
-ProjectExamples=Project Examples file
\ No newline at end of file
+ProjectExamples=Project Examples file
+JBoss_Developer_Studio_Examples = JBoss Developer Studio Examples
+JBoss_Tools_Community_Examples = JBoss Tools Community Examples
+Project_Examples = Project Examples
\ No newline at end of file
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2009-05-12 20:02:47 UTC (rev 15236)
@@ -42,8 +42,30 @@
</menuContribution>
</extension>
<extension
- point="org.jboss.tools.project.examples.projectExamplesXml">
+ point="org.jboss.tools.project.examples.projectExamplesXml"
+ name="%JBoss_Developer_Studio_Examples">
<url>http://download.jboss.org/jbosstools/examples/project-examples-3.0.xml</url>
+ <experimental>false</experimental>
</extension>
+
+ <extension
+ point="org.jboss.tools.project.examples.projectExamplesXml"
+ name="%JBoss_Tools_Community_Examples">
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/examples/project-exam... </url>
+ <experimental>true</experimental>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.jboss.tools.common.model.ui.MainPreferencePage"
+ class="org.jboss.tools.project.examples.preferences.ProjectExamplesPreferencePage"
+ id="org.jboss.tools.project.examples.preferences.projectExamplesPreferencePage"
+ name="%Project_Examples"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.jboss.tools.project.examples.preferences.ProjectExamplesPreferencesInitializer"/>
+ </extension>
</plugin>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/schema/projectExamplesXml.exsd
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/schema/projectExamplesXml.exsd 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/schema/projectExamplesXml.exsd 2009-05-12 20:02:47 UTC (rev 15236)
@@ -2,9 +2,9 @@
<!-- Schema file written by PDE -->
<schema targetNamespace="org.jboss.tools.project.examples" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appinfo>
+ <appInfo>
<meta.schema plugin="org.jboss.tools.project.examples" id="projectExamplesXml" name="Project Examples file"/>
- </appinfo>
+ </appInfo>
<documentation>
Adds a new Project Examples xml file
</documentation>
@@ -12,13 +12,14 @@
<element name="extension">
<annotation>
- <appinfo>
+ <appInfo>
<meta.element />
- </appinfo>
+ </appInfo>
</annotation>
<complexType>
<sequence>
- <element ref="url" minOccurs="1" maxOccurs="unbounded"/>
+ <element ref="url"/>
+ <element ref="experimental"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -39,9 +40,9 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute translatable="true"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
</complexType>
@@ -50,19 +51,22 @@
<element name="url" type="string">
</element>
+ <element name="experimental" type="string">
+ </element>
+
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="since"/>
- </appinfo>
+ </appInfo>
<documentation>
3.0.0
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="examples"/>
- </appinfo>
+ </appInfo>
<documentation>
<extension
point="org.jboss.tools.project.examples.projectExamplesXml">
@@ -72,27 +76,27 @@
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="apiinfo"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="implementation"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="copyright"/>
- </appinfo>
+ </appInfo>
<documentation>
JBoss, a division of Red Hat
</documentation>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -22,7 +22,6 @@
public static String ECFExamplesTransport_Loading;
public static String ECFExamplesTransport_ReceivedSize_Of_FileSize_At_RatePerSecond;
public static String ECFExamplesTransport_Server_redirected_too_many_times;
- public static String ECFExamplesTransport_Unexpected_interrupt_while_waiting_on_ECF_transfer;
public static String MarkerDialog_Description;
public static String MarkerDialog_Finish;
public static String MarkerDialog_Markers;
@@ -46,13 +45,29 @@
public static String NewProjectExamplesWizardPage_Projects;
public static String NewProjectExamplesWizardPage_Show_the_Quick_Fix_dialog;
public static String NewProjectExamplesWizardPage_URL;
- public static String Project_JBoss_Tools_Team_from_jboss_org;
- public static String Project_Local;
public static String Project_Unknown;
public static String ProjectExamplesActivator_All;
public static String ProjectExamplesActivator_Waiting;
+ public static String ProjectExamplesPreferencePage_Add;
+ public static String ProjectExamplesPreferencePage_Edit;
+ public static String ProjectExamplesPreferencePage_Remove;
+ public static String ProjectExamplesPreferencePage_Show_experimental_sites;
+ public static String ProjectExamplesPreferencePage_Sites;
+ public static String ProjectUtil_Invalid_preferences;
public static String ProjectUtil_Invalid_URL;
public static String ProjectUtil_Invalid_welcome_element;
+ public static String ProjectUtil_Test;
+ public static String SiteDialog_Add_Project_Example_Site;
+ public static String SiteDialog_Browse;
+ public static String SiteDialog_Edit_Project_Example_Site;
+ public static String SiteDialog_Invalid_URL;
+ public static String SiteDialog_Name;
+ public static String SiteDialog_The_name_field_is_required;
+ public static String SiteDialog_The_site_already_exists;
+ public static String SiteDialog_The_url_field_is_required;
+ public static String SiteDialog_URL;
+ public static String Sites_Plugin_provided_sites;
+ public static String Sites_User_sites;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -36,6 +36,9 @@
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.project.examples"; //$NON-NLS-1$
public static final String ALL_SITES = Messages.ProjectExamplesActivator_All;
+ public static final String SHOW_EXPERIMENTAL_SITES = "showExperimentalSites"; //$NON-NLS-1$
+ public static final String USER_SITES = "userSites"; //$NON-NLS-1$
+ public static final boolean SHOW_EXPERIMENTAL_SITES_VALUE = false;
// The shared instance
private static ProjectExamplesActivator plugin;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2009-05-12 20:02:47 UTC (rev 15236)
@@ -9,7 +9,6 @@
# eg 241.73 KB of 30.95 MB (at 34.18 KB/s)
ECFExamplesTransport_ReceivedSize_Of_FileSize_At_RatePerSecond={0} of {1} (at {2}/s)
ECFExamplesTransport_Server_redirected_too_many_times=Server redirected too many times
-ECFExamplesTransport_Unexpected_interrupt_while_waiting_on_ECF_transfer=Unexpected interrupt while waiting on ECF transfer
MarkerDialog_Description=Description
MarkerDialog_Finish=Finish
MarkerDialog_Markers=Markers:
@@ -33,11 +32,27 @@
NewProjectExamplesWizardPage_Projects=Projects:
NewProjectExamplesWizardPage_Show_the_Quick_Fix_dialog=Show the Quick Fix dialog
NewProjectExamplesWizardPage_URL=URL:
-Project_JBoss_Tools_Team_from_jboss_org=JBoss Tools Team from jboss.org
-Project_Local=Local
Project_Unknown=Unknown
ProjectExamplesActivator_All=All
ProjectExamplesActivator_Waiting=Waiting...
+ProjectExamplesPreferencePage_Add=Add
+ProjectExamplesPreferencePage_Edit=Edit
+ProjectExamplesPreferencePage_Remove=Remove
+ProjectExamplesPreferencePage_Show_experimental_sites=Show experimental sites
+ProjectExamplesPreferencePage_Sites=Sites
+ProjectUtil_Invalid_preferences=Invalid preferences.
ProjectUtil_Invalid_URL=Invalid URL\: {0}
ProjectUtil_Invalid_welcome_element=The welcome element has invalid the url attribute
-NewProjectExamplesWizardPage_Site=Site\:
\ No newline at end of file
+ProjectUtil_Test=Test
+NewProjectExamplesWizardPage_Site=Site\:
+SiteDialog_Add_Project_Example_Site=Add Project Example Site
+SiteDialog_Browse=Browse...
+SiteDialog_Edit_Project_Example_Site=Edit Project Example Site
+SiteDialog_Invalid_URL=Invalid url.
+SiteDialog_Name=Name:
+SiteDialog_The_name_field_is_required=The name field is required.
+SiteDialog_The_site_already_exists=The site already exists.
+SiteDialog_The_url_field_is_required=The url field is required.
+SiteDialog_URL=URL:
+Sites_Plugin_provided_sites=Plugin provided sites
+Sites_User_sites=User sites
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IProjectExampleSite.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IProjectExampleSite.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/IProjectExampleSite.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,5 @@
+package org.jboss.tools.project.examples.model;
+
+public interface IProjectExampleSite {
+ public String getName();
+}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -13,9 +13,6 @@
import java.math.BigDecimal;
import java.util.List;
-import org.jboss.tools.project.examples.Messages;
-import org.jboss.tools.project.examples.ProjectExamplesActivator;
-
/**
* @author snjeza
*
@@ -139,7 +136,7 @@
}
public String getSite() {
- if (site == null) {
+ /*if (site == null) {
if (getUrl().startsWith("http://anonsvn.jboss.org")) { //$NON-NLS-1$
site = Messages.Project_JBoss_Tools_Team_from_jboss_org;
} else if (getUrl().startsWith("file:")) { //$NON-NLS-1$
@@ -147,7 +144,7 @@
} else {
site = Messages.Project_Unknown;
}
- }
+ }*/
return site;
}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleSite.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleSite.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleSite.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,76 @@
+package org.jboss.tools.project.examples.model;
+
+import java.net.URL;
+
+public class ProjectExampleSite implements IProjectExampleSite {
+ private URL url;
+ private String name;
+ private boolean experimental;
+ private boolean editable = false;
+
+ public ProjectExampleSite() {
+ }
+
+ public URL getUrl() {
+ return url;
+ }
+
+ public void setUrl(URL url) {
+ this.url = url;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean isExperimental() {
+ return experimental;
+ }
+
+ public void setExperimental(boolean experimental) {
+ this.experimental = experimental;
+ }
+
+ public boolean isEditable() {
+ return editable;
+ }
+
+ public void setEditable(boolean editable) {
+ this.editable = editable;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ProjectExampleSite other = (ProjectExampleSite) obj;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "ProjectExampleSite [name=" + name + ", url=" + url + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -11,19 +11,33 @@
package org.jboss.tools.project.examples.model;
import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.StringTokenizer;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -32,6 +46,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
@@ -40,6 +55,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.xml.sax.helpers.DefaultHandler;
/**
* @author snjeza
@@ -47,21 +63,34 @@
*/
public class ProjectUtil {
+ private static final String URL = "url"; //$NON-NLS-1$
+
+ private static final String NAME = "name"; //$NON-NLS-1$
+
+ private static final String SITES = "sites"; //$NON-NLS-1$
+
+ private static final String SITE = "site"; //$NON-NLS-1$
+
private static final String EDITOR = "editor"; //$NON-NLS-1$
public static final String CHEATSHEETS = "cheatsheets"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
+ public static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
private static final String PROJECT_EXAMPLES_XML_EXTENSION_ID = "org.jboss.tools.project.examples.projectExamplesXml"; //$NON-NLS-1$
- private static List<URL> URLs;
+
+ private static String URL_EXT = URL;
+
+ private static String EXPERIMENTAL_EXT = "experimental"; //$NON-NLS-1$
+ private static Set<ProjectExampleSite> pluginSites;
+
private ProjectUtil() {
}
- private static List<URL> getURLs() {
- if (URLs == null) {
- URLs = new ArrayList<URL>();
+ public static Set<ProjectExampleSite> getPluginSites() {
+ if (pluginSites == null) {
+ pluginSites = new HashSet<ProjectExampleSite>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry
.getExtensionPoint(PROJECT_EXAMPLES_XML_EXTENSION_ID);
@@ -70,23 +99,101 @@
IExtension extension = extensions[i];
IConfigurationElement[] configurationElements = extension
.getConfigurationElements();
+ ProjectExampleSite site = new ProjectExampleSite();
+ site.setName(extension.getLabel());
for (int j = 0; j < configurationElements.length; j++) {
IConfigurationElement configurationElement = configurationElements[j];
- String urlString = configurationElement.getValue();
- URL url = getURL(urlString);
- if (url != null) {
- URLs.add(url);
+ if (URL_EXT.equals(configurationElement.getName())) {
+ String urlString = configurationElement.getValue();
+ URL url = getURL(urlString);
+ if (url != null) {
+ site.setUrl(url);
+ }
+ } else if (EXPERIMENTAL_EXT.equals(configurationElement.getName())) {
+ String experimental = configurationElement.getValue();
+ if ("true".equals(experimental)) { //$NON-NLS-1$
+ site.setExperimental(true);
+ }
}
}
+ if (site.getUrl() != null) {
+ pluginSites.add(site);
+ }
}
- URL url = getURL(getProjectExamplesXml());
- if (url != null) {
- URLs.add(url);
+
+ }
+ return pluginSites;
+ }
+
+ public static Set<ProjectExampleSite> getUserSites() {
+ Set<ProjectExampleSite> sites = new HashSet<ProjectExampleSite>();
+ ProjectExampleSite site = getSite(getProjectExamplesXml());
+ if (site != null) {
+ sites.add(site);
+ }
+ IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
+ String sitesAsXml = store.getString(ProjectExamplesActivator.USER_SITES);
+ if (sitesAsXml != null && sitesAsXml.trim().length() > 0) {
+ Element rootElement = parseDocument(sitesAsXml);
+ if (!rootElement.getNodeName().equals(SITES)) {
+ ProjectExamplesActivator.log(Messages.ProjectUtil_Invalid_preferences);
+ return sites;
}
+ NodeList list = rootElement.getChildNodes();
+ int length = list.getLength();
+ for (int i = 0; i < length; ++i) {
+ Node node = list.item(i);
+ short type = node.getNodeType();
+ if (type == Node.ELEMENT_NODE) {
+ Element entry = (Element) node;
+ if(entry.getNodeName().equals(SITE)){
+ String name = entry.getAttribute(NAME);
+ String urlString = entry.getAttribute(URL);
+ if (name != null && name.trim().length() > 0 && urlString != null && urlString.trim().length() > 0) {
+ URL url = null;
+ try {
+ url = new URL(urlString);
+ } catch (MalformedURLException e) {
+ ProjectExamplesActivator.log(Messages.ProjectUtil_Invalid_preferences);
+ continue;
+ }
+ site = new ProjectExampleSite();
+ site.setName(name);
+ site.setUrl(url);
+ site.setExperimental(true);
+ site.setEditable(true);
+ sites.add(site);
+ }
+ }
+ }
+ }
}
- return URLs;
+ return sites;
}
+
+ private static Set<ProjectExampleSite> getSites() {
+ Set<ProjectExampleSite> sites = new HashSet<ProjectExampleSite>();
+ sites.addAll(getPluginSites());
+ sites.addAll(getUserSites());
+ return sites;
+ }
+ private static ProjectExampleSite getSite(String url) {
+ if (url != null) {
+ ProjectExampleSite site = new ProjectExampleSite();
+ try {
+ site.setUrl(new URL(url));
+ } catch (MalformedURLException e) {
+ ProjectExamplesActivator.log(e);
+ return null;
+ }
+ site.setExperimental(true);
+ site.setName(Messages.ProjectUtil_Test);
+ return site;
+ }
+ return null;
+ }
+
private static URL getURL(String urlString) {
if (urlString != null && urlString.trim().length() > 0) {
urlString = urlString.trim();
@@ -101,15 +208,19 @@
}
public static List<Category> getProjects() {
- getURLs();
+ Set<ProjectExampleSite> sites = getSites();
List<Category> list = new ArrayList<Category>();
Category other = Category.OTHER;
try {
- for (URL url : URLs) {
- File file = getProjectExamplesFile(url,
+ for (ProjectExampleSite site : sites) {
+ boolean showExperimentalSites = ProjectExamplesActivator.getDefault().getPreferenceStore().getBoolean(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES);
+ if (!showExperimentalSites && site.isExperimental()) {
+ continue;
+ }
+ File file = getProjectExamplesFile(site.getUrl(),
"projectExamples", ".xml", null); //$NON-NLS-1$ //$NON-NLS-2$
if (file == null || !file.exists() || !file.isFile()) {
- ProjectExamplesActivator.log(NLS.bind(Messages.ProjectUtil_Invalid_URL,url.toString()));
+ ProjectExamplesActivator.log(NLS.bind(Messages.ProjectUtil_Invalid_URL,site.getUrl().toString()));
continue;
}
DocumentBuilderFactory dbf = DocumentBuilderFactory
@@ -147,7 +258,7 @@
}
project.setCategory(category);
}
- if (nodeName.equals("name")) { //$NON-NLS-1$
+ if (nodeName.equals(NAME)) { //$NON-NLS-1$
project.setName(getContent(child));
}
if (nodeName.equals("site")) { //$NON-NLS-1$
@@ -160,7 +271,7 @@
if (nodeName.equals("description")) { //$NON-NLS-1$
project.setDescription(getContent(child));
}
- if (nodeName.equals("url")) { //$NON-NLS-1$
+ if (nodeName.equals(URL)) { //$NON-NLS-1$
project.setUrl(getContent(child));
}
if (nodeName.equals("size")) { //$NON-NLS-1$
@@ -195,7 +306,7 @@
} else {
project.setType(EDITOR);
}
- attribute = child.getAttribute("url"); //$NON-NLS-1$
+ attribute = child.getAttribute(URL); //$NON-NLS-1$
if (attribute == null || attribute.trim().length() <= 0) {
project.setWelcome(false);
ProjectExamplesActivator.log(Messages.ProjectUtil_Invalid_welcome_element);
@@ -206,6 +317,13 @@
}
}
}
+ if (project.getSite() == null) {
+ String siteName = site.getName();
+ if (siteName == null) {
+ siteName = Messages.Project_Unknown;
+ }
+ project.setSite(siteName);
+ }
category.getProjects().add(project);
}
}
@@ -273,4 +391,59 @@
private static ECFExamplesTransport getTransport() {
return ECFExamplesTransport.getInstance();
}
+
+ public static Document getDocument() throws ParserConfigurationException {
+ DocumentBuilderFactory dfactory= DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder= dfactory.newDocumentBuilder();
+ Document doc= docBuilder.newDocument();
+ return doc;
+ }
+
+ public static String getAsXML(Set<ProjectExampleSite> sites)
+ throws ParserConfigurationException, TransformerException,
+ UnsupportedEncodingException {
+ if (sites == null || sites.size() == 0) {
+ return ""; //$NON-NLS-1$
+ }
+ Document doc = getDocument();
+ Element sitesElement = doc.createElement(SITES); //$NON-NLS-1$
+ doc.appendChild(sitesElement);
+ for (ProjectExampleSite site : sites) {
+ Element siteElement = doc.createElement(SITE);
+ siteElement.setAttribute(NAME, site.getName());
+ siteElement.setAttribute(URL, site.getUrl().toString());
+ sitesElement.appendChild(siteElement);
+ }
+ ByteArrayOutputStream s = new ByteArrayOutputStream();
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = factory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
+ DOMSource source = new DOMSource(doc);
+ StreamResult outputTarget = new StreamResult(s);
+ transformer.transform(source, outputTarget);
+ return s.toString("UTF8"); //$NON-NLS-1$
+ }
+
+ public static Element parseDocument(String document) {
+ Element root = null;
+ InputStream stream = null;
+ try{
+ DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ parser.setErrorHandler(new DefaultHandler());
+ stream = new ByteArrayInputStream(document.getBytes("UTF8")); //$NON-NLS-1$
+ root = parser.parse(stream).getDocumentElement();
+ } catch (Exception e) {
+ ProjectExamplesActivator.log(e);
+ } finally {
+ try{
+ if (stream != null) {
+ stream.close();
+ }
+ } catch(IOException e) {
+ ProjectExamplesActivator.log(e);
+ }
+ }
+ return root;
+ }
}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,25 @@
+package org.jboss.tools.project.examples.model;
+
+import java.util.Set;
+
+public class SiteCategory implements IProjectExampleSite {
+
+ private String name;
+ private Set<ProjectExampleSite> sites;
+
+ public SiteCategory(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Set<ProjectExampleSite> getSites() {
+ return sites;
+ }
+
+ public void setSites(Set<ProjectExampleSite> sites) {
+ this.sites = sites;
+ }
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,249 @@
+package org.jboss.tools.project.examples.preferences;
+
+import java.net.URL;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.project.examples.Messages;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.IProjectExampleSite;
+import org.jboss.tools.project.examples.model.ProjectExampleSite;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+import org.jboss.tools.project.examples.model.SiteCategory;
+
+public class ProjectExamplesPreferencePage extends PreferencePage implements
+ IWorkbenchPreferencePage {
+
+ private Button button;
+ private Sites sites;
+ private TreeViewer viewer;
+ private ProjectExampleSite selectedSite;
+
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ composite.setLayout(layout);
+
+ button = new Button(composite,SWT.CHECK);
+ button.setText(Messages.ProjectExamplesPreferencePage_Show_experimental_sites);
+ IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
+ button.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES));
+ Group sitesGroup = new Group(composite,SWT.NONE);
+ sitesGroup.setText(Messages.ProjectExamplesPreferencePage_Sites);
+ GridLayout gl = new GridLayout(2,false);
+ sitesGroup.setLayout(gl);
+ sitesGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ viewer = new TreeViewer(sitesGroup,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ viewer.setContentProvider(new SitesContentProvider());
+ viewer.setLabelProvider(new SitesLabelProvider());
+ sites = new Sites();
+ viewer.setInput(sites);
+ viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+ viewer.expandAll();
+
+ Composite buttonComposite = new Composite(sitesGroup, SWT.NONE);
+ buttonComposite.setLayout(new GridLayout(1,false));
+ buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
+
+ Button addButton = new Button(buttonComposite, SWT.PUSH);
+ addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ addButton.setText(Messages.ProjectExamplesPreferencePage_Add);
+ addButton.addSelectionListener(new SelectionListener(){
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ SiteDialog dialog = new SiteDialog(getShell(),null,sites);
+ int ok = dialog.open();
+ if (ok == Window.OK) {
+ String name = dialog.getName();
+ if (name != null) {
+ URL url = dialog.getURL();
+ ProjectExampleSite site = new ProjectExampleSite();
+ site.setUrl(url);
+ site.setName(name);
+ site.setEditable(true);
+ sites.add(site);
+ viewer.refresh();
+ }
+ }
+ }
+
+
+ });
+ final Button editButton = new Button(buttonComposite, SWT.PUSH);
+ editButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ editButton.setText(Messages.ProjectExamplesPreferencePage_Edit);
+ editButton.setEnabled(false);
+ editButton.addSelectionListener(new SelectionListener(){
+
+ public void widgetSelected(SelectionEvent e) {
+ if (selectedSite == null) {
+ return;
+ }
+ SiteDialog dialog = new SiteDialog(getShell(),selectedSite,sites);
+ int ok = dialog.open();
+ if (ok == Window.OK) {
+ String name = dialog.getName();
+ if (name != null) {
+ URL url = dialog.getURL();
+ ProjectExampleSite site = selectedSite;
+ site.setUrl(url);
+ site.setName(name);
+ site.setEditable(true);
+ viewer.refresh();
+ }
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+ final Button removeButton = new Button(buttonComposite, SWT.PUSH);
+ removeButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ removeButton.setText(Messages.ProjectExamplesPreferencePage_Remove);
+ removeButton.setEnabled(false);
+
+ removeButton.addSelectionListener(new SelectionListener(){
+
+ public void widgetSelected(SelectionEvent e) {
+ if (selectedSite != null) {
+ sites.remove(selectedSite);
+ viewer.refresh();
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+
+ viewer.addSelectionChangedListener(new ISelectionChangedListener(){
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ editButton.setEnabled(false);
+ removeButton.setEnabled(false);
+ selectedSite = null;
+ ISelection selection = event.getSelection();
+ if (selection instanceof ITreeSelection) {
+ ITreeSelection treeSelection = (ITreeSelection) selection;
+ Object object = treeSelection.getFirstElement();
+ if (object instanceof ProjectExampleSite) {
+ selectedSite = (ProjectExampleSite) object;
+ boolean editable = ((ProjectExampleSite) object).isEditable();
+ editButton.setEnabled(editable);
+ removeButton.setEnabled(editable);
+ }
+ }
+ }
+ });
+
+ return composite;
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+
+ @Override
+ protected void performDefaults() {
+ button.setSelection(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES_VALUE);
+ sites.getUserSites().clear();
+ storeSites();
+ super.performDefaults();
+ }
+
+ @Override
+ public boolean performOk() {
+ storeSites();
+ return super.performOk();
+ }
+
+ private void storeSites() {
+ IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
+ store.setValue(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES, button.getSelection());
+ try {
+ String userSites = ProjectUtil.getAsXML(sites.getUserSites());
+ store.setValue(ProjectExamplesActivator.USER_SITES, userSites);
+ } catch (Exception e) {
+ ProjectExamplesActivator.log(e);
+ }
+ }
+
+ class SitesContentProvider implements ITreeContentProvider {
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof Sites) {
+ return ((Sites)parentElement).getSiteCategories();
+ }
+ if (parentElement instanceof SiteCategory) {
+ return ((SiteCategory) parentElement).getSites().toArray();
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return element instanceof Sites || element instanceof SiteCategory;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ }
+
+ class SitesLabelProvider extends LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IProjectExampleSite) {
+ return ((IProjectExampleSite) element).getName();
+ }
+ return super.getText(element);
+ }
+
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,21 @@
+package org.jboss.tools.project.examples.preferences;
+
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+
+public class ProjectExamplesPreferencesInitializer extends
+ AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences node = new DefaultScope().getNode("org.jboss.tools.project.examples"); //$NON-NLS-1$
+
+ node.putBoolean(
+ ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES,
+ ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES_VALUE);
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,208 @@
+package org.jboss.tools.project.examples.preferences;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.project.examples.Messages;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.ProjectExampleSite;
+
+public class SiteDialog extends TitleAreaDialog {
+
+ private static final String ADD_PROJECT_EXAMPLE_SITE = Messages.SiteDialog_Add_Project_Example_Site;
+ private static final String EDIT_PROJECT_EXAMPLE_SITE = Messages.SiteDialog_Edit_Project_Example_Site;
+ private Image dlgTitleImage;
+ private ProjectExampleSite selectedSite;
+ private String name;
+ private URL url;
+ private Text nameText;
+ private Text urlText;
+ private Button okButton;
+ private Sites sites;
+
+ protected SiteDialog(Shell parentShell, ProjectExampleSite site, Sites sites) {
+ super(parentShell);
+ this.selectedSite = site;
+ this.sites = sites;
+ }
+
+ @Override
+ protected Control createContents(Composite parent) {
+
+ Control contents = super.createContents(parent);
+ if (selectedSite == null) {
+ setTitle(ADD_PROJECT_EXAMPLE_SITE);
+ setMessage(ADD_PROJECT_EXAMPLE_SITE);
+ } else {
+ setTitle(EDIT_PROJECT_EXAMPLE_SITE);
+ setMessage(EDIT_PROJECT_EXAMPLE_SITE);
+ }
+ ImageDescriptor descriptor = ProjectExamplesActivator
+ .imageDescriptorFromPlugin(ProjectExamplesActivator.PLUGIN_ID,
+ "icons/new_wiz.gif"); //$NON-NLS-1$
+ if(descriptor != null) {
+ dlgTitleImage = descriptor.createImage();
+ setTitleImage(dlgTitleImage);
+ }
+
+ return contents;
+ }
+
+ @Override
+ public boolean close() {
+ if (dlgTitleImage != null) {
+ dlgTitleImage.dispose();
+ }
+ return super.close();
+ }
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite parentComposite = (Composite) super.createDialogArea(parent);
+ Composite composite = new Composite(parentComposite, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ composite.setFont(parentComposite.getFont());
+
+ Composite container = new Composite(parentComposite, SWT.FILL);
+ layout = new GridLayout(3,false);
+ layout.marginWidth = layout.marginHeight = 5;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ container.setLayoutData(gd);
+
+ Label nameLabel = new Label(container, SWT.NONE);
+ nameLabel.setText(Messages.SiteDialog_Name);
+ nameText = new Text(container, SWT.SINGLE|SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan=2;
+ nameText.setLayoutData(gd);
+ nameText.addModifyListener(new ModifyListener(){
+
+ public void modifyText(ModifyEvent e) {
+ validatePage();
+ }
+ });
+
+ Label urlLabel = new Label(container, SWT.NONE);
+ urlLabel.setText(Messages.SiteDialog_URL);
+ urlText = new Text(container, SWT.SINGLE|SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ urlText.setLayoutData(gd);
+ urlText.addModifyListener(new ModifyListener(){
+
+ public void modifyText(ModifyEvent e) {
+ validatePage();
+ }
+
+ });
+ if (selectedSite != null) {
+ urlText.setText(selectedSite.getUrl().toString());
+ nameText.setText(selectedSite.getName());
+ }
+ Button browse = new Button(container,SWT.PUSH);
+ browse.setText(Messages.SiteDialog_Browse);
+ browse.addSelectionListener(new SelectionListener(){
+
+ public void widgetSelected(SelectionEvent e) {
+
+
+ FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);
+ dialog.setFilterExtensions(new String[] { "*.xml" }); //$NON-NLS-1$;
+
+ String result = dialog.open();
+ if (result == null || result.trim().length() == 0) {
+ return;
+ }
+ urlText.setText("file:/" + result); //$NON-NLS-1$
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+
+ return parentComposite;
+ }
+
+ private boolean validatePage() {
+ name = null;
+ url = null;
+ if (nameText.getText().trim().length() <= 0) {
+ setErrorMessage(Messages.SiteDialog_The_name_field_is_required);
+ return updateButton(false);
+ }
+ Set<ProjectExampleSite> siteList = sites.getSites();
+ for(ProjectExampleSite site:siteList) {
+ if (site != selectedSite && nameText.getText().equals(site.getName())) {
+ setErrorMessage(Messages.SiteDialog_The_site_already_exists);
+ return updateButton(false);
+ }
+ }
+ if (urlText.getText().trim().length() <= 0) {
+ setErrorMessage(Messages.SiteDialog_The_url_field_is_required);
+ return updateButton(false);
+ }
+ try {
+ @SuppressWarnings("unused")
+ URL url = new URL(urlText.getText());
+ } catch (MalformedURLException e) {
+ setErrorMessage(Messages.SiteDialog_Invalid_URL);
+ return updateButton(false);
+ }
+ setErrorMessage(null);
+ name = nameText.getText();
+ try {
+ url = new URL(urlText.getText());
+ } catch (MalformedURLException ignore) {}
+ return updateButton(true);
+ }
+
+ private boolean updateButton(boolean enabled) {
+ if (okButton != null) {
+ okButton.setEnabled(enabled);
+ }
+ return false;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ okButton = createButton(parent, IDialogConstants.OK_ID,
+ IDialogConstants.OK_LABEL, true);
+ okButton.setEnabled(selectedSite != null);
+ createButton(parent, IDialogConstants.CANCEL_ID,
+ IDialogConstants.CANCEL_LABEL, false);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public URL getURL() {
+ return url;
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -0,0 +1,51 @@
+package org.jboss.tools.project.examples.preferences;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.tools.project.examples.Messages;
+import org.jboss.tools.project.examples.model.ProjectExampleSite;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+import org.jboss.tools.project.examples.model.SiteCategory;
+
+public class Sites {
+ private SiteCategory[] siteCategories;
+ private SiteCategory userSite;
+ private Set<ProjectExampleSite> sites;
+
+ public SiteCategory[] getSiteCategories() {
+ if (siteCategories == null) {
+ siteCategories = new SiteCategory[2];
+ userSite = new SiteCategory(Messages.Sites_User_sites);
+ Set<ProjectExampleSite> userSites = ProjectUtil.getUserSites();
+ userSite.setSites(userSites);
+ siteCategories[0]=userSite;
+ SiteCategory pluginSite = new SiteCategory(Messages.Sites_Plugin_provided_sites);
+ Set<ProjectExampleSite> pluginSites = ProjectUtil.getPluginSites();
+ pluginSite.setSites(pluginSites);
+ siteCategories[1]=pluginSite;
+ sites = new HashSet<ProjectExampleSite>();
+ sites.addAll(pluginSites);
+ sites.addAll(userSites);
+ }
+ return siteCategories;
+ }
+
+ public void remove(ProjectExampleSite site) {
+ userSite.getSites().remove(site);
+ sites.remove(site);
+ }
+
+ public void add(ProjectExampleSite site) {
+ userSite.getSites().add(site);
+ sites.add(site);
+ }
+
+ public Set<ProjectExampleSite> getSites() {
+ return sites;
+ }
+
+ public Set<ProjectExampleSite> getUserSites() {
+ return userSite.getSites();
+ }
+}
\ No newline at end of file
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2009-05-12 19:14:40 UTC (rev 15235)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2009-05-12 20:02:47 UTC (rev 15236)
@@ -100,7 +100,7 @@
final ProjectExamplesPatternFilter filter = new ProjectExamplesPatternFilter();
int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- final FilteredTree filteredTree = new FilteredTree(composite, styleBits, filter);
+ final FilteredTree filteredTree = new FilteredTree(composite, styleBits, filter,true);
filteredTree.setBackground(parent.getDisplay().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
final TreeViewer viewer = filteredTree.getViewer();
15 years, 5 months
JBoss Tools SVN: r15235 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-05-12 15:14:40 -0400 (Tue, 12 May 2009)
New Revision: 15235
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
Log:
JUnit tests errors fix for:
- junit.framework.AssertionFailedError: org.jboss.tools.jst.web.debug failed to load.
at org.jboss.tools.tests.PlugInLoadTest.isPluginResolved(PlugInLoadTest.java:36)
- junit.framework.AssertionFailedError: org.jboss.tools.struts.debug failed to load.
at org.jboss.tools.tests.PlugInLoadTest.isPluginResolved(PlugInLoadTest.java:36)
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2009-05-12 17:20:07 UTC (rev 15234)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2009-05-12 19:14:40 UTC (rev 15235)
@@ -85,8 +85,6 @@
assertPluginsResolved(new String[] {
rhdsNS + "jst.jsp", //$NON-NLS-1$
rhdsNS + "jst.web", //$NON-NLS-1$
- rhdsNS + "jst.web.debug", //$NON-NLS-1$
- rhdsNS + "jst.web.debug.ui", //$NON-NLS-1$
rhdsNS + "jst.web.tiles", //$NON-NLS-1$
rhdsNS + "jst.web.tiles.ui", //$NON-NLS-1$
rhdsNS + "jst.web.ui", //$NON-NLS-1$
@@ -103,7 +101,6 @@
public void testStrutsPluginsResolved() {
assertPluginsResolved(new String[] {
rhdsNS + "struts", //$NON-NLS-1$
- rhdsNS + "struts.debug", //$NON-NLS-1$
rhdsNS + "struts.text.ext", //$NON-NLS-1$
rhdsNS + "struts.ui", //$NON-NLS-1$
rhdsNS + "struts.validator.ui", //$NON-NLS-1$
15 years, 5 months
JBoss Tools SVN: r15234 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-05-12 13:20:07 -0400 (Tue, 12 May 2009)
New Revision: 15234
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-414 - added info about the option available in the Preferences of VPE
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-05-12 17:19:00 UTC (rev 15233)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-05-12 17:20:07 UTC (rev 15234)
@@ -882,6 +882,14 @@
</mediaobject>
</figure>
+ <para>You can also switch on this option in the VPE preferences, having clicked on the <emphasis><property>Preferences</property>
+ </emphasis> button
+ (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/icon_1.png"/>
+ </imageobject>
+ </inlinemediaobject>).</para>
+
<section id="comments">
<title>Commenting out Code</title>
15 years, 5 months
JBoss Tools SVN: r15232 - trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-05-12 10:10:31 -0400 (Tue, 12 May 2009)
New Revision: 15232
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java
Log:
Test Suite title was corrected.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java 2009-05-12 13:59:22 UTC (rev 15231)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/src/org/jboss/tools/vpe/html/test/HtmlAllTests.java 2009-05-12 14:10:31 UTC (rev 15232)
@@ -35,7 +35,7 @@
public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); //$NON-NLS-1$
+ TestSuite suite = new TestSuite("Tests for Vpe HTML components"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(JBIDE3280Test.class);
suite.addTestSuite(HtmlComponentTest.class);
15 years, 5 months
JBoss Tools SVN: r15231 - in trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb: taglib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-12 09:59:22 -0400 (Tue, 12 May 2009)
New Revision: 15231
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/taglib/IAttribute.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-12 13:22:57 UTC (rev 15230)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-12 13:59:22 UTC (rev 15231)
@@ -195,8 +195,25 @@
* @see org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.IPageContext)
*/
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
- // TODO Auto-generated method stub
- return null;
+ List<TextProposal> proposals = new ArrayList<TextProposal>();
+ IAttribute[] attributes = getAttributes(query, context);
+ if(query.getType() == KbQuery.Type.ATTRIBUTE_NAME) {
+ for (int i = 0; i < attributes.length; i++) {
+ TextProposal proposal = new TextProposal();
+ proposal.setContextInfo(attributes[i].getDescription());
+ proposal.setReplacementString(attributes[i].getName());
+ proposal.setLabel(attributes[i].getName());
+ proposals.add(proposal);
+ }
+ } else if(query.getType() == KbQuery.Type.ATTRIBUTE_VALUE) {
+ for (int i = 0; i < attributes.length; i++) {
+ TextProposal[] attributeProposals = attributes[i].getProposals(query, context);
+ for (int j = 0; j < attributeProposals.length; j++) {
+ proposals.add(attributeProposals[j]);
+ }
+ }
+ }
+ return proposals.toArray(new TextProposal[proposals.size()]);
}
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/taglib/IAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/taglib/IAttribute.java 2009-05-12 13:22:57 UTC (rev 15230)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/kb/taglib/IAttribute.java 2009-05-12 13:59:22 UTC (rev 15231)
@@ -25,7 +25,7 @@
/**
* @return description
*/
- String getDesription();
+ String getDescription();
/**
* @return true if the attribute is required.
15 years, 5 months
JBoss Tools SVN: r15230 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-05-12 09:22:57 -0400 (Tue, 12 May 2009)
New Revision: 15230
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4271, sash switching logic was corrected.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-05-12 12:58:09 UTC (rev 15229)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/CustomSashForm.java 2009-05-12 13:22:57 UTC (rev 15230)
@@ -77,7 +77,21 @@
public int[][] sashLocs; // There is one entry for each arrow, It is arrowType/arrowDrawn/x/y/height/width of the arrow area.
// There may not be a second entry, in which case we have only one arrow.
public SashInfo(Sash sash) {
- this.sash = sash;
+ this.sash = sash;
+ /*
+ * Init the sash weight with the default value.
+ */
+ String defaultWeightString = VpePreference.SOURCE_VISUAL_EDITORS_WEIGHTS.getValue();
+ try {
+ int defaultWeight = Integer.parseInt(defaultWeightString);
+ if (defaultWeight > 0) {
+ weight = defaultWeight;
+ }
+ } catch (NumberFormatException e) {
+ /*
+ * Do nothing
+ */
+ }
}
};
@@ -113,6 +127,15 @@
WIDTH_INDEX = 4,
HEIGHT_INDEX = 5;
+ /*
+ * Flag indicating that one part of the sash form is maximized.
+ */
+ private boolean maximized = false;
+ /*
+ * Flag indicating the necessity to store the new sash weight.
+ */
+ private boolean storeWeight = true;
+
/**
* Constructor for CustomSashForm.
* @param parent
@@ -167,11 +190,13 @@
* Call to set to max up
*/
public void maxUp() {
- if (noMaxUp)
- return;
+ if (noMaxUp) {
+ return;
+ }
- if (currentSashInfo == null)
- currentSashInfo = new SashInfo(null);
+ if (currentSashInfo == null){
+ currentSashInfo = new SashInfo(null);
+ }
upMaxClicked(currentSashInfo);
}
@@ -184,25 +209,28 @@
public void upClicked() {
- if (currentSashInfo != null && currentSashInfo.weight >= 0)
- upClicked(currentSashInfo);
+ if (currentSashInfo != null && currentSashInfo.weight >= 0) {
+ upClicked(currentSashInfo);
+ }
}
public void downClicked() {
- if (currentSashInfo != null && currentSashInfo.weight >= 0)
- downClicked(currentSashInfo);
+ if (currentSashInfo != null && currentSashInfo.weight >= 0) {
+ downClicked(currentSashInfo);
+ }
}
/**
* Call to set to max down
*/
public void maxDown() {
- if (noMaxDown)
- return;
+ if (noMaxDown) {
+ return;
+ }
- if (currentSashInfo == null)
- currentSashInfo = new SashInfo(null);
-
+ if (currentSashInfo == null) {
+ currentSashInfo = new SashInfo(null);
+ }
downMaxClicked(currentSashInfo);
}
@@ -231,11 +259,13 @@
public void layout(boolean changed) {
super.layout(changed);
- if (noMaxUp && noMaxDown)
- return; // No arrows to handle in this case.
+ if (noMaxUp && noMaxDown) {
+ return; // No arrows to handle in this case.
+ }
- if (getMaximizedControl() != null)
- return; // We have a maximized control, so we don't need to worry about the sash.
+ if (getMaximizedControl() != null) {
+ return; // We have a maximized control, so we don't need to worry about the sash.
+ }
// Let's get the list of all sashes the sash form now has. If there is more than one then just disable the sashinfo.
// If there is no current sash, and there is only one sash, then create the sashinfo for it.
@@ -247,32 +277,33 @@
newSash = (Sash) children[i];
else {
// We have more than one sash, so need to disable current sash, if we have one.
- if (currentSashInfo != null)
- currentSashInfo.enabled = false;
+ if (currentSashInfo != null) {
+ currentSashInfo.enabled = false;
+ }
return; // Don't go on.
}
}
- if (newSash == null)
- return; // We have no sashes at all.
+ if (newSash == null) {
+ return; // We have no sashes at all.
+ }
// Now we need to see if this is a new sash.
if (currentSashInfo == null || currentSashInfo.sash == null) {
- if (currentSashInfo == null)
- currentSashInfo = new SashInfo(newSash);
- else
- currentSashInfo.sash = newSash;
+ if (currentSashInfo == null) {
+ currentSashInfo = new SashInfo(newSash);
+ } else {
+ currentSashInfo.sash = newSash;
+ }
newSash.addPaintListener(new PaintListener() {
/**
* @see org.eclipse.swt.events.PaintListener#paintControl(PaintEvent)
*/
public void paintControl(PaintEvent e) {
// Need to find the index of the sash we're interested in.
-
GC gc = e.gc;
Color oldFg = gc.getForeground();
Color oldBg = gc.getBackground();
-
/*
* Draw first arrow
*/
@@ -284,11 +315,12 @@
drawArrow(gc, currentSashInfo.sashLocs[1], currentSashInfo.cursorOver == 1);
}
- if (currentSashInfo.sashBorderLeft)
- drawSashBorder(gc, currentSashInfo.sash, true);
- if (currentSashInfo.sashBorderRight)
- drawSashBorder(gc, currentSashInfo.sash, false);
-
+ if (currentSashInfo.sashBorderLeft) {
+ drawSashBorder(gc, currentSashInfo.sash, true);
+ }
+ if (currentSashInfo.sashBorderRight) {
+ drawSashBorder(gc, currentSashInfo.sash, false);
+ }
gc.setForeground(oldFg);
gc.setBackground(oldBg);
}
@@ -305,14 +337,14 @@
// String text = s.getToolTipText();
// if(text.equalsIgnoreCase(anotherString))
// }
- recomputeSashInfo();
+ recomputeSashInfo(false);
}
/**
* @see org.eclipse.swt.events.ControlAdapter#controlResized(ControlEvent)
*/
public void controlResized(ControlEvent e) {
- recomputeSashInfo();
+ recomputeSashInfo(false);
}
@@ -388,7 +420,6 @@
currentSashInfo.sash.setToolTipText(null);
}
}
-
});
// Need to know when we leave so that we can clear the cursor feedback if set.
@@ -416,7 +447,11 @@
@Override
public void mouseDown(MouseEvent e) {
inMouseClick = true;
- // If we're within a button, then redraw to wipe out stipple and get button push effect.
+ /*
+ * If we're within a button,
+ * then redraw to wipe out stipple
+ * and get button push effect.
+ */
int x = e.x;
int y = e.y;
for (int i=0; i<currentSashInfo.sashLocs.length; i++) {
@@ -437,7 +472,9 @@
*/
@Override
public void mouseUp(MouseEvent e) {
- // See if within one of the arrows.
+ /*
+ * See if within one of the arrows.
+ */
inMouseClick = false; // No longer in down click
int x = e.x;
int y = e.y;
@@ -463,29 +500,37 @@
downMaxClicked(currentSashInfo);
break;
}
+ recomputeSashInfo(true); // apply arrow click
break;
}
}
currentSashInfo.sash.redraw(); // Make sure stipple goes away from the mouse up if not over an arrow button.
fireDividerMoved();
}
-
});
- recomputeSashInfo(); // Get initial setting
+ recomputeSashInfo(true); // Get initial setting
}
}
-
- protected void recomputeSashInfo() {
+ /**
+ * Recomputes the sash data: arrows, widths, sizes.
+ *
+ * @param arrowClicked if the sash arrow was clicked.
+ */
+ protected void recomputeSashInfo(boolean arrowClicked) {
/*
* Don't process because we are in the down mouse button on an arrow.
*/
- if (inMouseClick && currentSashInfo.cursorOver != NO_WEIGHT) {
+ if (inMouseClick) {
return;
}
/*
+ * By default we should save a new sash width.
+ */
+ storeWeight = true;
+ /*
* We need to refigure size for the sash arrows.
*/
int[] addArrows = null;
@@ -499,7 +544,6 @@
* Current sash orientation.
*/
int orientation = getOrientation();
-
if (noMaxUp) {
addArrows = new int[1];
drawArrows = new int[1];
@@ -521,7 +565,7 @@
* Since we are in the middle, there is no weight.
* We've could of been dragged here.
*/
- currentSashInfo.weight = NO_WEIGHT;
+ maximized = false;
currentSashInfo.sashBorderLeft = sashBorders != null ? sashBorders[0] : false;
currentSashInfo.sashBorderRight = sashBorders != null ? sashBorders[1] : false;
}
@@ -546,7 +590,7 @@
* Since we are in the middle, there is no weight.
* We've could of been dragged here.
*/
- currentSashInfo.weight = NO_WEIGHT;
+ maximized = false;
currentSashInfo.sashBorderLeft = sashBorders != null ? sashBorders[0] : false;
currentSashInfo.sashBorderRight = sashBorders != null ? sashBorders[1] : false;
}
@@ -557,7 +601,7 @@
Rectangle clientArea = getClientArea();
final int DRAG_MINIMUM = 20; // TODO: kludge see SashForm.DRAG_MINIMUM
if (weights[0] == 0
- || ((currentSashInfo.weight != NO_WEIGHT)
+ || (!maximized
&& ((orientation == SWT.VERTICAL) && (sashBounds.y <= DRAG_MINIMUM)
|| (orientation == SWT.HORIZONTAL) && (sashBounds.x <= DRAG_MINIMUM)))) {
/*
@@ -578,9 +622,9 @@
currentSashInfo.sashBorderRight = sashBorders != null ? sashBorders[1] : false;
} else if ((weights[1] == 0)
- || ((currentSashInfo.weight != NO_WEIGHT)
+ || (!maximized
&& (((orientation == SWT.VERTICAL) && (sashBounds.y + sashBounds.height >= clientArea.height - DRAG_MINIMUM))
- || ((orientation == SWT.HORIZONTAL) && (sashBounds.x + sashBounds.width >= clientArea.width - DRAG_MINIMUM))))) {
+ || ((orientation == SWT.HORIZONTAL) && (sashBounds.x + sashBounds.width >= clientArea.width - DRAG_MINIMUM))))) {
/*
* When maximized to the bottom or to the right
*/
@@ -597,8 +641,9 @@
}
currentSashInfo.sashBorderLeft = sashBorders != null ? sashBorders[0] : false;
currentSashInfo.sashBorderRight = false;
- } else {
+ } else if (arrowClicked) {
/*
+ * After an arrow have been clicked.
* Not slammed
*/
addArrows[0] = UP_MAX_ARROW;
@@ -609,12 +654,79 @@
* Since we are in the middle, there is no weight.
* We've could of been dragged here.
*/
- currentSashInfo.weight = NO_WEIGHT;
+ maximized = false;
currentSashInfo.sashBorderLeft = sashBorders != null ? sashBorders[0] : false;
currentSashInfo.sashBorderRight = sashBorders != null ? sashBorders[1] : false;
+ } else {
+ /*
+ * When sash is dragged or clicked in maximized state
+ * Not slammed.
+ */
+ if (maximized) {
+ /*
+ * if the sash is in the top or to the left
+ */
+ if(weights[1] > weights[0]) {
+ if (orientation == SWT.VERTICAL) {
+ addArrows[0] = DOWN_MAX_ARROW;
+ drawArrows[0] = DOWN_MAX_ARROW;
+ addArrows[1] = DOWN_ARROW;
+ drawArrows[1] = DOWN_ARROW;
+ } else {
+ addArrows[0] = DOWN_ARROW;
+ drawArrows[0] = DOWN_ARROW;
+ addArrows[1] = DOWN_MAX_ARROW;
+ drawArrows[1] = DOWN_MAX_ARROW;
+ }
+ }
+ /*
+ * if the sash is in the bottom or to the right
+ */
+ if(weights[0] > weights[1]) {
+ if (orientation == SWT.VERTICAL) {
+ addArrows[0] = UP_ARROW;
+ drawArrows[0] = UP_ARROW;
+ addArrows[1] = UP_MAX_ARROW;
+ drawArrows[1] = UP_MAX_ARROW;
+ } else {
+ addArrows[0] = UP_MAX_ARROW;
+ drawArrows[0] = UP_MAX_ARROW;
+ addArrows[1] = UP_ARROW;
+ drawArrows[1] = UP_ARROW;
+ }
+ }
+ maximized = false;
+ /*
+ * Do not store sash weight because
+ * this is temporary state of the sash
+ * after clicking on it from maximized state.
+ */
+ storeWeight = false;
+
+ } else {
+ /*
+ * Not maximized, general behavior.
+ */
+ if (orientation == SWT.VERTICAL) {
+ addArrows[0] = DOWN_MAX_ARROW;
+ drawArrows[0] = DOWN_ARROW;
+ addArrows[1] = UP_MAX_ARROW;
+ drawArrows[1] = UP_ARROW;
+ } else {
+ addArrows[0] = UP_MAX_ARROW;
+ drawArrows[0] = UP_ARROW;
+ addArrows[1] = DOWN_MAX_ARROW;
+ drawArrows[1] = DOWN_ARROW;
+ }
+ }
+ if (storeWeight) {
+ currentSashInfo.weight = weights[1];
+ }
}
+ currentSashInfo.sashBorderLeft = sashBorders != null ? sashBorders[0] : false;
+ currentSashInfo.sashBorderRight = sashBorders != null ? sashBorders[1] : false;
}
- getNewSashArray(currentSashInfo, addArrows, drawArrows);
+ setNewSashLocs(currentSashInfo, addArrows, drawArrows);
/*
* Need to schedule a redraw
* because it has already drawn the old ones
@@ -624,86 +736,93 @@
}
protected void upClicked(SashInfo sashinfo) {
- /*
- * This means restore just the sash below weight
- * and reduce the above weight by the right amount.
- */
+ /*
+ * This means restore just the sash below weight
+ * and reduce the above weight by the right amount.
+ */
+ if (sashinfo.weight > 0) {
int[] weights = getWeights();
- if (sashinfo.weight != NO_WEIGHT) {
- weights[0] = 1000-sashinfo.weight; // Assume weights are always in units of 1000
- weights[1] = sashinfo.weight;
- sashinfo.weight = NO_WEIGHT; // Set '-1' to weight to show that sash is not slammed.
- setWeights(weights);
- fireDividerMoved();
- }
+ weights[0] = 1000-sashinfo.weight; // Assume weights are always in units of 1000
+ weights[1] = sashinfo.weight;
+ maximized = false;
+ setWeights(weights);
+ fireDividerMoved();
+ }
}
protected void upMaxClicked(SashInfo sashinfo) {
- int[] weights = getWeights();
- /*
- * Up max, so save the current weight of 1 into the sash info,
- * and move to the top.
- */
- if (currentSashInfo.weight == NO_WEIGHT) {
- currentSashInfo.weight = weights[1]; // Not currently maxed, save position.
- }
-
- weights[1] = 1000;
- weights[0] = 0;
-
- /*
- * If the upper panel has focus,
- * flip focus to the lower panel
- * because the upper panel is now hidden.
- */
- Control[] children = getChildren();
- boolean upperFocus = isFocusAncestorA(children[0]);
- setWeights(weights);
- if (upperFocus) {
- children[1].setFocus();
- }
- recomputeSashInfo();
- fireDividerMoved();
+ /*
+ * Up max, so save the current weight of 1 into the sash info,
+ * and move to the top.
+ */
+ int[] weights = getWeights();
+ /*
+ * Store previous sash width only when
+ * it's not maximized and there is a flag to store
+ */
+ if (!maximized && storeWeight) {
+ currentSashInfo.weight = weights[1];
+ }
+ maximized = true;
+ weights[1] = 1000;
+ weights[0] = 0;
+ /*
+ * If the upper panel has focus,
+ * flip focus to the lower panel
+ * because the upper panel is now hidden.
+ */
+ Control[] children = getChildren();
+ boolean upperFocus = isFocusAncestorA(children[0]);
+ setWeights(weights);
+ if (upperFocus) {
+ children[1].setFocus();
+ }
+ fireDividerMoved();
}
protected void downClicked(SashInfo sashinfo) {
- /*
- * This means restore just the sash below weight
- * and increase the above weight by that amount.
- */
+ /*
+ * This means restore just the sash below weight
+ * and increase the above weight by that amount.
+ */
+ if (sashinfo.weight > 0) {
int[] weights = getWeights();
- if (sashinfo.weight != NO_WEIGHT) {
- weights[0] = 1000-sashinfo.weight; // Assume weights are always in units of 1000
- weights[1] = sashinfo.weight;
- sashinfo.weight = NO_WEIGHT; // Set '-1' to weight to show that sash is not slammed.
- setWeights(weights);
- fireDividerMoved();
- }
+ weights[0] = 1000-sashinfo.weight; // Assume weights are always in units of 1000
+ weights[1] = sashinfo.weight;
+ maximized = false;
+ setWeights(weights);
+ fireDividerMoved();
+ }
}
protected void downMaxClicked(SashInfo sashinfo) {
- int[] weights = getWeights();
- /*
- * Down max, so save the current weight of 1 into the sash info, and move to the bottom.
- */
- if (currentSashInfo.weight == NO_WEIGHT) {
- currentSashInfo.weight = weights[1]; // Not currently maxed, save current weight.
- }
- weights[0] = 1000;
- weights[1] = 0;
- /*
- * If the lower panel has focus,
- * flip focus to the upper panel
- * because the lower panel is now hidden.
- */
- Control[] children = getChildren();
- boolean lowerFocus = isFocusAncestorA(children[1]);
- setWeights(weights);
- if (lowerFocus) {
- children[0].setFocus();
- }
- recomputeSashInfo();
- fireDividerMoved();
+ /*
+ * Down max, so save the current weight of 1 into the sash info,
+ * and move to the bottom.
+ */
+ int[] weights = getWeights();
+ /*
+ * Store previous sash width only when
+ * it's not maximized and there is a flag to store
+ */
+ if (!maximized && storeWeight) {
+ currentSashInfo.weight = weights[1];
+ }
+ maximized = true;
+ weights[0] = 1000;
+ weights[1] = 0;
+ /*
+ * If the lower panel has focus,
+ * flip focus to the upper panel
+ * because the lower panel is now hidden.
+ */
+ Control[] children = getChildren();
+ boolean lowerFocus = isFocusAncestorA(children[1]);
+ setWeights(weights);
+ if (lowerFocus) {
+ children[0].setFocus();
+ }
+ fireDividerMoved();
}
/*
@@ -719,11 +838,19 @@
return control == focusControl;
}
- protected void getNewSashArray(SashInfo sashInfo, int[] addArrowTypes, int[] drawArrowTypes) {
+ /**
+ * Sets new sash arrows' locations and types.
+ *
+ * @param sashInfo the SashInfo
+ * @param addArrowTypes types of the arrows
+ * @param drawArrowTypes icons of the arrows
+ */
+ protected void setNewSashLocs(SashInfo sashInfo, int[] addArrowTypes, int[] drawArrowTypes) {
int[][] thisSash = sashInfo.sashLocs;
- if (thisSash == null)
- thisSash = sashInfo.sashLocs = new int[addArrowTypes.length][];
+ if (thisSash == null) {
+ thisSash = sashInfo.sashLocs = new int[addArrowTypes.length][];
+ }
int aSize = ARROW_SIZE; // Width of arrow
int tSize = aSize+2*ARROW_MARGIN; // Total Width (arrow + margin)
@@ -761,12 +888,15 @@
thisSash[j][WIDTH_INDEX] = width;
thisSash[j][HEIGHT_INDEX] = height;
}
- if (vertical)
- x+=tSize;
- else
- y+=tSize;
+ if (vertical) {
+ x+=tSize;
+ }
+ else {
+ y+=tSize;
+ }
}
}
+
protected void drawSashBorder(GC gc, Sash sash, boolean leftBorder) {
gc.setForeground(borderColor);
if (getOrientation() == SWT.VERTICAL) {
@@ -989,7 +1119,7 @@
public void setCurrentSavedWeight(int weight) {
if (weight>=0 && currentSashInfo!=null) {
- recomputeSashInfo();
+ recomputeSashInfo(false);
currentSashInfo.weight=weight;
}
}
15 years, 5 months
JBoss Tools SVN: r15229 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-05-12 08:58:09 -0400 (Tue, 12 May 2009)
New Revision: 15229
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
trunk/documentation/jboss-tools-docs/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-451 - adding Guvnor Tools Ref guide;
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2009-05-12 12:51:40 UTC (rev 15228)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2009-05-12 12:58:09 UTC (rev 15229)
@@ -301,6 +301,20 @@
</fileSet>
<fileSet>
+ <directory>../../drools/docs/guvnor_ref/target/docbook/publish/en-US</directory>
+ <outputDirectory>/guvnor_tools_ref_guide</outputDirectory>
+ <filtered>false</filtered>
+ <lineEnding>keep</lineEnding>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ <useStrictFiltering>false</useStrictFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
+
+ <fileSet>
<directory>../../smooks/docs/reference/target/docbook/publish/en-US</directory>
<outputDirectory>/jboss_smooks_plugin_ref_guide</outputDirectory>
<filtered>false</filtered>
Modified: trunk/documentation/jboss-tools-docs/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/pom.xml 2009-05-12 12:51:40 UTC (rev 15228)
+++ trunk/documentation/jboss-tools-docs/pom.xml 2009-05-12 12:58:09 UTC (rev 15229)
@@ -29,6 +29,7 @@
<module>../../portlet/docs/reference</module>
<module>../../birt/docs</module>
<module>../../drools/docs/reference</module>
+ <module>../../drools/docs/guvnor_ref</module>
<module>../../smooks/docs/reference</module>
<module>../../jbpm/docs/converter_ref</module>
<module>../../jmx/docs/reference</module>
15 years, 5 months
JBoss Tools SVN: r15228 - trunk/documentation/jboss-tools-docs/index/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-05-12 08:51:40 -0400 (Tue, 12 May 2009)
New Revision: 15228
Modified:
trunk/documentation/jboss-tools-docs/index/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-451 - adding Guvnor Tools Ref guide into index page;
Modified: trunk/documentation/jboss-tools-docs/index/en/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/en/master.xml 2009-05-12 12:50:47 UTC (rev 15227)
+++ trunk/documentation/jboss-tools-docs/index/en/master.xml 2009-05-12 12:51:40 UTC (rev 15228)
@@ -126,7 +126,7 @@
<indexentry>
- <primaryie>JBoss Birt Plugin Reference Guide <ulink
+ <primaryie>Birt Plugin Integration Reference Guide<ulink
url="en/jboss_birt_plugin_ref_guide/html/index.html">(html)</ulink>
<ulink url="en/jboss_birt_plugin_ref_guide/html_single/index.html">(html single)</ulink>
<ulink url="en/jboss_birt_plugin_ref_guide/pdf/Birt_Reference_Guide.pdf"
@@ -143,8 +143,15 @@
</primaryie>
</indexentry>
-
<indexentry>
+ <primaryie>Eclipse Guvnor Tools Reference Guide<ulink
+ url="en/guvnor_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/guvnor_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/guvnor_tools_ref_guide/pdf/Drools_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
<primaryie>Exadel Studio Migration Guide <ulink
url="en/Exadel-migration/html/index.html">(html)</ulink>
<ulink url="en/Exadel-migration/html_single/index.html">(html single)</ulink>
@@ -154,7 +161,7 @@
</indexentry>
<indexentry>
- <primaryie>Smooks Reference Guide <ulink
+ <primaryie>Smooks Reference Guide<ulink
url="en/jboss_smooks_plugin_ref_guide/html/index.html">(html)</ulink>
<ulink url="en/jboss_smooks_plugin_ref_guide/html_single/index.html">(html single)</ulink>
<ulink url="en/jboss_smooks_plugin_ref_guide/pdf/Smooks_Reference_Guide.pdf"
15 years, 5 months
JBoss Tools SVN: r15227 - in trunk/drools/docs: guvnor_ref and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-05-12 08:50:47 -0400 (Tue, 12 May 2009)
New Revision: 15227
Added:
trunk/drools/docs/guvnor_ref/
trunk/drools/docs/guvnor_ref/en/
trunk/drools/docs/guvnor_ref/en/images/
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/add_toGuvnor_wizard.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/association_details.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version2.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version3.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/confirm_delete.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/delete_connection_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/do_into_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_back_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_home_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_defaultPackage.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_button.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_wizard.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_preferences.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_repository.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnorinfo.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/open_guvnor_perspectine.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/repository_files_properties.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor2.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor3.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view2.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view3.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/select_target_folder.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection1.png
trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection2.png
trunk/drools/docs/guvnor_ref/en/images/guvnor_preferences/
trunk/drools/docs/guvnor_ref/en/images/guvnor_preferences/guvnor_preferences.png
trunk/drools/docs/guvnor_ref/en/master.xml
trunk/drools/docs/guvnor_ref/en/modules/
trunk/drools/docs/guvnor_ref/en/modules/conclusion.xml
trunk/drools/docs/guvnor_ref/en/modules/functionality_overview.xml
trunk/drools/docs/guvnor_ref/en/modules/guvnor_preferences.xml
trunk/drools/docs/guvnor_ref/en/modules/introduction.xml
trunk/drools/docs/guvnor_ref/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-451 - adding Guvnor Tools Reference guide;
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/add_toGuvnor_wizard.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/add_toGuvnor_wizard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/association_details.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/association_details.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version2.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version3.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/compare_with_version3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/confirm_delete.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/confirm_delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/delete_connection_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/delete_connection_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/do_into_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/do_into_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_back_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_back_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_home_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_home_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_defaultPackage.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/go_into_defaultPackage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_wizard.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_connection_wizard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_preferences.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_preferences.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_repository.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnor_repository.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnorinfo.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/guvnorinfo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/open_guvnor_perspectine.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/open_guvnor_perspectine.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/repository_files_properties.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/repository_files_properties.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor2.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor3.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_from_guvnor3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view2.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view3.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/resource_history_view3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/select_target_folder.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/select_target_folder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection1.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection2.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/functionality_overview/start_guvnor_connection2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/images/guvnor_preferences/guvnor_preferences.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/guvnor_ref/en/images/guvnor_preferences/guvnor_preferences.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/guvnor_ref/en/master.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en/master.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/en/master.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
+
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY functionality_overview SYSTEM "modules/functionality_overview.xml">
+<!ENTITY guvnor_preferences SYSTEM "modules/guvnor_preferences.xml">
+<!ENTITY conclusion SYSTEM "modules/conclusion.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]>
+
+<book>
+
+ <bookinfo>
+ <title>Eclipse Guvnor Tools Reference Guide</title>
+
+ <author><firstname>John</firstname><surname>Graham</surname><email>jgraham(a)redhat.com</email></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <!--releaseinfo>
+ Version: 5.0.0.M5
+ </releaseinfo-->
+<abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/guvnor/pdf/Eclipse_G...">PDF version</ulink>
+ </para>
+ </abstract>
+
+ </bookinfo>
+
+
+ <toc/>
+ &introduction;
+ &functionality_overview;
+ &guvnor_preferences;
+ &conclusion;
+
+</book>
Added: trunk/drools/docs/guvnor_ref/en/modules/conclusion.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en/modules/conclusion.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/en/modules/conclusion.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="conclusion" xreflabel="conclusion">
+ <?dbhtml filename="conclusion.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Eclipse Guvnor Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Conclusion</title>
+
+ <para>As stated at the beginning of this document, the key goal of the <property>EGT</property>
+ is to provide a way of interacting with Guvnor repository resources in a local Eclipse
+ workspace. While clearly there is a lot more that could be done, and no doubt there will be
+ aspects of the current tooling that require revision going forward, we feel that the current
+ state of the <property>EGT</property> is sufficient for the major use cases.</para>
+
+ <para>If you have some questions, comments or suggestions on the topic, please feel free to ask in the
+ <ulink url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=201"
+ >Jboss Tools Forum</ulink>.</para>
+</chapter>
Added: trunk/drools/docs/guvnor_ref/en/modules/functionality_overview.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en/modules/functionality_overview.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/en/modules/functionality_overview.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,727 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="functionality_overview" xreflabel="functionality_overview">
+ <?dbhtml filename="functionality_overview.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Eclipse Guvnor Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Functionality Overview</title>
+
+ <para>This chapter will introduce you to the <property>Guvnor Repository Exploring
+ perspective</property> and give an overview on all functionality the <property>Guvnor Tools</property> provides.</para>
+
+ <section id="guvnor_perspective">
+ <title>Guvnor Perspective</title>
+
+ <para>The <property>Guvnor Repository Exploring perspective</property> contains two views
+ supplied by <property>EGT</property> – <property>Repository Explorer</property> and
+ <property>Version History</property>, that will be the center of most interaction
+ with Guvnor, and Eclipse standard views such as <property>Properties</property> and
+ <property>Resource Navigator</property> that are also useful.</para>
+
+ <para>While each of these views can be opened and positioned independently within an Eclipse
+ workbench, the <property>Guvnor perspective</property> provides a convenient method of
+ getting a suggested layout. In the Eclipse workbench menu, choose <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> to get the perspective list:</para>
+
+ <figure>
+ <title>Enabling the Guvnor Repository Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/open_guvnor_perspectine.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>And then choose <emphasis>
+ <property>Guvnor Repository Exploring</property>.</emphasis> This opens the
+ <property>Guvnor perspective</property>.</para>
+ </section>
+
+ <section id="connection_wizard">
+ <title>Guvnor Connection Wizard</title>
+
+ <para>After opening the <property>Guvnor perspective</property>, the first task is to make a
+ connection to a Guvnor repository. This is handled by the <property>Guvnor Connection
+ wizard</property>. This wizard appears in a number of places within the
+ <property>EGT</property> (as detailed below), but in this section we will cover only
+ the two most basic entry points.</para>
+
+ <para>The <property>Guvnor Connection wizard</property> can be started in the following
+ ways:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>using the Eclipse menu <emphasis>
+ <property>File > New > Other > Guvnor > Guvnor
+ repository location</property>
+ </emphasis></para>
+
+ <figure>
+ <title>New Guvnor Repository Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/start_guvnor_connection1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem>
+ <para>in the <property>Guvnor Repositories view</property> using the drop-down menu</para>
+
+ <figure>
+ <title>Adding New Guvnor Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/start_guvnor_connection2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem>
+ <para>using the menu button
+ ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/guvnor_connection_button.png"/>
+ </imageobject>
+ </inlinemediaobject> )
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Choosing either of these will start the <property>Guvnor Connection
+ wizard</property>.</para>
+
+ <figure id="guvnor_connection_wizard">
+ <title>Guvnor Connection Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/guvnor_connection_wizard.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Default values appear in the <emphasis>
+ <property>Location</property>,</emphasis>
+ <emphasis>
+ <property>Port</property>,</emphasis> and <emphasis>
+ <property>Repository</property>
+ </emphasis> fields (See the <link linkend="guvnor_preferences">“Guvnor Preferences”</link> section below for details about how to
+ change these default values.) Of course, any of these fields can be edited by typing in
+ the corresponding text box. Drag-and-drop or paste into the <emphasis>
+ <property>Location</property>
+ </emphasis> field of a typical Guvnor repository URL such as:</para>
+
+ <para>
+ <emphasis>
+ <property>http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav</property>
+ </emphasis>
+ </para>
+
+ <para>Results in the URL being parsed into the respective fields as well. The authentication
+ information (user name and password) can optionally be stored in the Eclipse
+ workbench's key-ring file based on the selection of <emphasis>
+ <property>Save user name and password</property>.</emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para>If the authentication information is not stored in the key-ring, then the
+ <property>EGT</property> uses a session authentication, what means that the
+ credentials supplied are used only for the lifetime of the Eclipse workbench
+ instance.</para>
+ </note>
+
+ <para>If authentication information is not stored in the key-ring or the authentication
+ information (key-ring or session) is not valid, the <property>EGT</property> will prompt
+ for authentication information when it has to access the Guvnor repository.</para>
+
+ <para>If authentication fails, the <property>EGT</property> will retry once and then issue
+ an authentication failure error.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>If an authentication failure error occurs, you can retry the same operation and
+ supply different authentication information.</para>
+ </tip>
+
+ <para>Note that the <property>EGT</property> calls the Guvnor repository at various times,
+ such as when determining if resource updates are available. Thus if you use session
+ authentication, the authentication dialog will appear at different times during the
+ Eclipse workbench session, depending on what actions you take. For ease of use, we
+ recommend saving the authentication information in the Eclipse key-ring.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The Eclipse key-ring file is distinct from key-ring files found in some platforms
+ such as Mac OS X and many forms of Linux. Thus, sometimes if you access a Guvnor
+ repository outside the <property>EGT</property>, the key-ring files might become
+ unsynchronized and you will be unexpectedly prompted for authentication in Eclipse.
+ This is nuisance, but your usual credentials should apply in this case.</para>
+ </note>
+ </section>
+
+ <section id="guvnor_repositories_view">
+ <title>Guvnor Repositories View</title>
+
+ <para>The <property>Guvnor Repositories view</property> contains tree structures for Guvnor
+ repository contents.</para>
+
+ <figure>
+ <title>Guvnor Repositories View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/guvnor_repository.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can perform the following actions under the resources in the
+ <property>Guvnor Repositories view</property>:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>create a new Guvnor repository connection. How to do this is describe above in the <link linkend="connection_wizard">"Guvnor Connection Wizard"</link> section.</para>
+ </listitem>
+
+ <listitem>
+ <para>remove a Guvnor repository connection. Use the Delete button
+ ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/delete_connection_button.png"/>
+ </imageobject>
+ </inlinemediaobject> ) in the tool-bar or the <emphasis>
+ <property>Delete</property></emphasis> option in the context menu to remove a repository connection.</para>
+ </listitem>
+
+ <listitem>
+ <para>refresh Guvnor repository resorces. Use the <emphasis>
+ <property>Refresh</property></emphasis> context menu item to reload a tree content for the selected node.</para>
+ </listitem>
+
+ <listitem>
+ <para>make use of "drill-into" functionality. It's represented by a number of tool-bar/context menu items such as <emphasis><property>Go Home</property></emphasis>
+ ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/go_home_button.png"/>
+ </imageobject>
+ </inlinemediaobject> ), <emphasis><property>Go Back</property></emphasis>
+ ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/go_back_button.png"/>
+ </imageobject>
+ </inlinemediaobject> ) and <emphasis>
+ <property>Go Into</property></emphasis>
+ ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/go_into_button.png"/>
+ </imageobject>
+ </inlinemediaobject> ).</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Drill-down is useful when working with deeply nested tree structures and when you wish to concentrate on only branch of the tree. For example, drilling into the <emphasis>
+ <property>"defaultPackage"</property></emphasis> node changes the tree view to:</para>
+
+ <figure>
+ <title>Going Into the <emphasis>"defaultPackage"</emphasis></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/go_into_defaultPackage.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Clicking on the Go Home button ( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/go_home_button.png"/>
+ </imageobject>
+ </inlinemediaobject> ) or selecting <emphasis>
+ <property>Go Home</property></emphasis> in the context menu returns the tree to the top-level structure shown in the previous picture above.
+ </para>
+
+ <para>There are a number of operations that can be performed on Guvnor repository files. Selecting a file in
+the Guvnor repository causes the Eclipse <property>Properties view</property> to update with details about that file:
+</para>
+
+ <figure>
+ <title>Guvnor Repository Files Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/repository_files_properties.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para></para>
+ </section>
+
+ <section id="local_copies">
+ <title>Local Copies of Guvnor Files</title>
+
+ <para>As mentioned in the <link linkend="introduction">"Introduction"</link>, the main purpose
+ of the <property>EGT</property> is to allow development using resources held in a Guvnor
+ repository. There are two method of getting local copies of Guvnor repository
+ resources:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Drag-and-drop from the <property>Guvnor Repositories view</property></para>
+ </listitem>
+ <listitem>
+ <para>Using the <link linkend="resources_from_guvnor">Import from Guvnor
+ wizard</link>, as described further in this document</para>
+ </listitem>
+ </orderedlist>
+
+ <para>When local copies of Guvnor repository files are created, the <property>EGT</property>
+ sets an association between the local copy and the master file in the repository. This
+ information is kept in the (normally) hidden <emphasis>
+ <property>.guvnorinfo</property>
+ </emphasis> folder in the local project and, like all metadata, should not be changed by
+ end users.</para>
+
+ <figure>
+ <title>.guvnorinfo metadata</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/guvnorinfo.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The association allows for operations such as update and commit in
+ synchronization with the master copy held in the Guvnor repository.</para>
+
+ <para>The <property>EGT</property> decorates local resources associated with Guvnor
+ repository master copies. This decoration appears in Eclipse views conforming to the
+ Eclipse Common Navigator framework, such as the Eclipse <property>Resource
+ Navigator</property> and the Java <property>Package Explorer</property>. On the image
+ above you can see the <emphasis>
+ <property>Dummy rule.drl</property></emphasis> file with the decoration in the <property>Resource Navigator</property>. The Guvnor icon decorator is on the top right of the file image, and the Guvnor
+ revision details are appended to the file name. (The presence/location of these can be
+ changed the <link linkend="resource_decoration_preferences">Guvnor
+ Preferences</link>.)</para>
+
+ <para>Here we see that, <emphasis><property>Dummy role.drl</property></emphasis> is associated with a Guvnor repository
+ resource and the local copy is based on revision 0, with a <code>02-10-2008, 4:21:53</code> date/time
+ stamp. The file <emphasis><property>Sample.drl</property>,</emphasis> however, is not associated with a Guvnor repository
+ file. Further details about the association can be found in the standard Eclipse
+ properties page, accessed via the <emphasis><property>Properties</property></emphasis> option in the context menu:</para>
+
+ <figure>
+ <title>Association Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/association_details.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property>EGT</property> contributes a property page to the standard Eclipse
+ properties dialog, the contents of which are shown above. It displays the specific Guvnor
+ repository, the location within the repository, the version (date/time stamp) and
+ the revision number.</para>
+ </section>
+
+ <section id="actions">
+ <title>Actions for Local Guvnor Resources</title>
+
+ <para>The <property>EGT</property> provides a number of actions (available through the
+ <emphasis><property>Guvnor</property></emphasis> context menu on files) for working with files, both those associated with
+ Guvnor repository master copies and those not associated. The actions are:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="update_action">Update</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="add_action">Add</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="commit_action">Commit</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="show_history_action">Show History</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="compare_with_version">Compare with Version</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="switch_to_version">Switch to Version</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="delete_action">Delete</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="disconnect_action">Disconnect</link>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Each of these actions is described below.</para>
+
+ <section id="update_action">
+ <title>Update Action</title>
+
+ <para>The <emphasis>
+ <property>Update</property>
+ </emphasis> action is available for one or more Guvnor resources that are not in
+ synchronization with the Guvnor repository master copies. These resources would not
+ be in synchronization because either/both</para>
+
+ <orderedlist>
+ <listitem><para>There are local changes to these
+ resources</para></listitem>
+ <listitem><para>The master copies have been changed in the Guvnor repository</para></listitem>
+ </orderedlist>
+
+ <para>Performing the <emphasis>
+ <property>Update</property>
+ </emphasis> action replaces the local file contents with the current contents from
+ the Guvnor repository master copies (equivalent to <emphasis>
+ <link linkend="switch_to_version">Switch to version</link>
+ </emphasis> for the latest version).</para>
+ </section>
+
+ <section id="add_action">
+ <title>Add Action</title>
+
+ <para>The <emphasis>
+ <property>Add</property>
+ </emphasis> action is available for one or more local files that are not associated
+ with a Guvnor repository master copy. Choosing the <emphasis>
+ <property>Add</property>
+ </emphasis> action launches the <property>Add to Guvnor wizard</property>:</para>
+
+ <figure>
+ <title>Add to Guvnor Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/add_toGuvnor_wizard.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first page of the wizard asks for the selection of the target Guvnor
+ repository and gives the choice to create a new Guvnor repository connection (in
+ which case the second page is the same as the <link linkend="guvnor_connection_wizard"
+ >Guvnor Connection wizard</link>). Once the target Guvnor repository is chosen,
+ the wizard then asks for the folder location to add the selection files:</para>
+
+ <figure>
+ <title>Selecting a Target Folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/select_target_folder.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here the <emphasis>
+ <property>"defaultPackage"</property></emphasis> folder is selected as the destination
+ location.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Note that the <emphasis>
+ <property>"snapshot"</property></emphasis> folder in the Guvnor repository is read-only for
+ <property>EGT</property>, and hence not visible as a candidate location in
+ this wizard. The Guvnor repository web administration tools must be used to add
+ snapshot content.</para>
+ </note>
+
+ <para>Clicking on <emphasis>
+ <property>Finish</property>
+ </emphasis> adds the selected files to the Guvnor repository and creates an
+ association between the local and Guvnor repository files.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Note that the wizard will not allow for overwrite of existing Guvnor
+ repository files. Another target location must be chosen.</para>
+ </note>
+ </section>
+
+ <section id="commit_action">
+ <title>Commit Action</title>
+
+ <para>The <emphasis>
+ <property>Commit</property>
+ </emphasis> action is enabled for one or more Guvnor repository associated files
+ that have local changes. The <emphasis>
+ <property>Commit</property>
+ </emphasis> action will write the local changes back to the associated Guvnor
+ repository files and update the association for the new revision created.</para>
+
+ <para>If a local change is based on an older revision of a file that is currently in the
+ Guvnor repository (for example, someone else changed the same file), then the <emphasis>
+ <property>Commit</property>
+ </emphasis> action will<figure>
+ <title>Add to Guvnor Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/add_toGuvnor_wizard.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure> ask whether you wish to overwrite the current version in the
+ Guvnor repository with the local content. When such conflicts occur, however, you
+ should use the Eclipse Guvnor version tools, along with Eclipse standard tools, to
+ determine the differences and merge content based on the current version in the
+ Guvnor repository.</para>
+ </section>
+
+ <section id="show_history_action">
+ <title>Show History Action</title>
+
+ <para>The <emphasis>
+ <property>Show History</property>
+ </emphasis> action is enable for one Guvnor repository associated file and causes
+ the <link linkend="guvnor_history_view">Guvnor Resource History view</link> to be
+ populated with revision history for the selected file.</para>
+ </section>
+
+ <section id="compare_with_version">
+ <title>Compare with Version Action</title>
+
+ <para>The <emphasis>
+ <property>Compare with Version</property>
+ </emphasis> action is enabled for one Guvnor repository associated file. This action
+ first opens a wizard asking for the version for comparison (with the local file
+ contents):</para>
+
+ <figure>
+ <title>Compare with Version Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/compare_with_version.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the revision is selected, the action opens the Eclipse <property>Compare
+ editor</property> (read-only):</para>
+ <figure>
+ <title>Eclipse Compare Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/compare_with_version2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>This editor uses Eclipse-standard comparison techniques to show the differences in
+ the two versions. In cases where there are no differences, the editor will not open,
+ rather a dialog saying that there are no differences will appear.</para>
+ <figure>
+ <title>Alert Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/compare_with_version3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="switch_to_version">
+ <title>Switch to Version Action</title>
+
+ <para>The <emphasis>
+ <property>Switch to Version</property>
+ </emphasis> action is enabled for one Guvnor repository associated file.</para>
+ <para>First the <emphasis>
+ <property>Switch to Version</property>
+ </emphasis> action prompts for selection of version:</para>
+
+ <figure>
+ <title>Select Version Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/compare_with_version.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the version is selected, the <emphasis>
+ <property>Switch to Version</property>
+ </emphasis> action replaces the local file contents with those from the revision
+ selected.</para>
+ </section>
+
+ <section id="delete_action">
+ <title>Delete Action</title>
+
+ <para>The <emphasis>
+ <property>Delete</property>
+ </emphasis> action is enabled for one or more Guvnor repository associated files.
+ After confirmation via a dialog, the <emphasis>
+ <property>Delete</property>
+ </emphasis> action removes the files in the Guvnor repository and deletes local
+ metadata for the Guvnor repository association.</para>
+
+ <figure>
+ <title>Comfirm Delete Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/confirm_delete.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="disconnect_action">
+ <title>Disconnect Action</title>
+
+ <para>The <emphasis>
+ <property>Disconnect</property>
+ </emphasis> action is enabled for one or more Guvnor repository associated files,
+ and removes local metadata for the Guvnor repository association.</para>
+ </section>
+ </section>
+
+ <section id="guvnor_history_view">
+ <title>Guvnor Resource History View</title>
+
+ <para>The <property>Guvnor Resource History view</property> should details about revision
+ history for selected files, both local and those in Guvnor repositories. The initial
+ state of this view is shown on the figure below.</para>
+
+ <figure>
+ <title>Initial State of the Guvnor Resource History View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_history_view.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property>Guvnor Resource History view</property> is populated by <emphasis>
+ <property>Show History</property>
+ </emphasis> actions in either the local <emphasis>
+ <property>Guvnor</property></emphasis> context menu or in the context menu for
+ a Guvnor repository file in the <link linkend="guvnor_repositories_view">Guvnor
+ Repositories view</link>. Once this action is performed, the <property>Guvnor
+ Resource History view</property> updates to show the revision history:</para>
+
+ <figure>
+ <title>IGuvnor Resource History View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_history_view2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here we see that the file <emphasis>
+ <property>test.txt</property>
+ </emphasis> has three revisions. Double clicking on a revision row (or the context menu <emphasis>
+ <property>Open (Read only)</property>)</emphasis> opens an Eclipse read-only editor
+ with the revision contents.</para>
+
+ <figure>
+ <title>Eclipse Read-only Editor with the Revision Contents</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_history_view3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>You can also use the <emphasis>
+ <property>Save As...</property>
+ </emphasis> option when a file is open in a read-only editor to save a local
+ writable copy of the contents. Doing so, however, will not associate the file
+ created with its Guvnor source.</para>
+ </note>
+
+ </section>
+
+ <section id="resources_from_guvnor">
+ <title>Importing Guvnor Repository Resources</title>
+
+ <para>In addition to the single file drag-and-drop from the <property>Guvnor Repositories
+ view</property>, the <property>EGT</property> also includes a wizard for copying one
+ or more files from a Guvnor repository to the local workspace (and setting the
+ association with the Guvnor repository). This wizard is available from the <emphasis>
+ <property>File > Import > Guvnor > Resource from
+ Guvnor</property>
+ </emphasis> and the <emphasis>
+ <property>File > New > Other > Guvnor > Resource from
+ Guvnor</property>
+ </emphasis> menu items.</para>
+ <note>
+ <title>Note:</title>
+
+ <para>Note that the wizard is identical but appears in both locations to accommodate
+ users who tend to view this functionality as being in either category.</para>
+ </note>
+
+ <para>The first page of the wizard asks for the selection of the source Guvnor repository
+ and gives the choice to create a new Guvnor repository connection (in which case the
+ second page is the same as the <link linkend="guvnor_connection_wizard">Guvnor Connection wizard</link>).</para>
+
+ <figure>
+ <title>Resource from Guvnor Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/add_toGuvnor_wizard.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the source Guvnor repository is chosen, the wizard prompts for resource selection:</para>
+
+ <figure>
+ <title>Resource Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, the target location in the local workspace should be chosen:</para>
+ <figure>
+ <title>Choosing the Target Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On completion the wizard copies the selected files from the Guvnor repository to the local workspace.
+ If a file with the same name already exists in the destination, the wizard uses the Eclipse standard
+ "prompt for rename" dialog:</para>
+
+ <figure>
+ <title>Prompt for Rename Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/functionality_overview/resource_from_guvnor3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
Added: trunk/drools/docs/guvnor_ref/en/modules/guvnor_preferences.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en/modules/guvnor_preferences.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/en/modules/guvnor_preferences.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,90 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="guvnor_preferences" xreflabel="guvnor_preferences">
+ <?dbhtml filename="guvnor_preferences.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Eclipse Guvnor Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Guvnor Preferences</title>
+
+ <para>The <property>EGT</property> provides a preference page in the <emphasis>
+ <property>Guvnor</property>
+ </emphasis> category:</para>
+
+ <figure>
+ <title>Resource Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guvnor_preferences/guvnor_preferences.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The preferences cover two categories:</para>
+ <itemizedlist>
+ <listitem><para>Guvnor repository connections</para></listitem>
+
+ <listitem><para>Local Guvnor
+ repository resource decorations.</para></listitem>
+ </itemizedlist>
+
+ <section id="repo_connection_preferences">
+ <title>Guvnor Repository Connection Preferences</title>
+ <para>There are two preferences that can be set for Guvnor repository connections, that are
+ used when creating new connections:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>The first is a default Guvnor repository URL template, which can make it
+ easier to create multiple similar connections by simply changing part of the
+ field, such as the host name.</para>
+ </listitem>
+ <listitem>
+ <para>The second is whether saving of authentication information in the Eclipse
+ platform key-ring should be enabled by default.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>As with the Guvnor repository URL template, actually whether to save a specific
+ instance of authentication information in the Eclipse platform key-ring can be
+ determined when actually creating the connection. That is, both of these preferences are
+ simply convenience values set to reasonable defaults.</para>
+ </section>
+
+ <section id="resource_decoration_preferences">
+ <title>Local Guvnor Repository Resource Decoration Preferences</title>
+
+ <para>The second category of preferences provided by the <property>EGT</property> deals with how the decoration of
+ local resources associated with Guvnor repository resources is presented. Since the
+ Guvnor repository is not a substitute for a SCM, and since SCM tools in Eclipse tend to
+ decorate local resources, it is useful to be able to control just how the <property>EGT</property> decorate
+ its local resources to avoid messy conflicts with SCM packages.</para>
+
+ <para>In the <emphasis>
+ <property>File Decoration</property></emphasis>
+ section of the preference page, you can choose the location (Top right, Top left, Bottom right,
+ Bottom left) of the decoration icon, or you can choose not to display it. In
+ the <emphasis>
+ <property>Text</property></emphasis> section, you can format the Guvnor metadata that is appended to the file
+ names:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Whether to show an indicator (>) when the local file has changes not committed back to the
+ Guvnor repository</para>
+ </listitem>
+ <listitem>
+ <para>Whether to show the revision number</para>
+ </listitem>
+ <listitem>
+ <para>Whether to show the date/time stamp</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Any changes to these preferences take effect immediately upon clicking the <emphasis>
+ <property>Apply</property></emphasis> and then <emphasis>
+ <property>Ok</property></emphasis> buttons.</para>
+ </section>
+</chapter>
Added: trunk/drools/docs/guvnor_ref/en/modules/introduction.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/en/modules/introduction.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/en/modules/introduction.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<chapter id="introduction" xreflabel="introduction">
+ <title>Introduction</title>
+
+ <para>The purpose of this document is to describe briefly the functionality present in the
+ <property>Eclipse Guvnor Tools</property> (EGT) for Drools 5. While not intended as a
+ comprehensive reference, there should be enough detail included for early adopters using
+ these tools.</para>
+
+ <para>The <property>Guvnor repository</property> is not intended as a Source Code Management
+ (SCM) solution, and the <property>EGT</property> are not intended to be Eclipse “team
+ provider” extensions or replacements. Rather, the Guvnor repository is a location where
+ certain artifacts (such as rules and SOA policy definitions) are controlled (“governed”) by
+ policies defined by the deployment environment. The purpose of the <property>EGT</property>
+ is then to enable access to resources held by the Guvnor repository, so
+ they can be used in development. Thus, limited capabilities for reading, writing, adding,
+ and removing Guvnor repository resources are provided in the
+ <property>EGT</property>.</para>
+
+ <section id="drools_key_features">
+ <title>Guvnor Tools Key Features</title>
+
+ <para>The following table lists all valuable features of the <property>Guvnor
+ Tools</property>.</para>
+ <table>
+ <title>Key Functionality of Guvnor Tools</title>
+ <tgroup cols="3">
+
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" colwidth="5*"/>
+ <colspec colnum="3" align="left" colwidth="1*"/>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Guvnor Repositories View</para>
+ </entry>
+ <entry>
+ <para>The purpose of the view is to enable access to Guvnor repository
+ resources in a standard tree format</para>
+ </entry>
+ <entry>
+ <link linkend="guvnor_repositories_view">Guvnor Repositories View</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Guvnor Connection Wizard</para>
+ </entry>
+ <entry>
+ <para>The wizard helps to create a connection to a Guvnor
+ repository.</para>
+ </entry>
+ <entry>
+ <link linkend="connection_wizard">Guvnor Connection Wizard</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Guvnor Resource History View</para>
+ </entry>
+ <entry>
+ <para>This view shows revisions of specific resources available in the
+ repository.</para>
+ </entry>
+ <entry>
+ <link linkend="guvnor_history_view">Guvnor Resource History View</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Resources from Guvnor Wizard</para>
+ </entry>
+ <entry>
+ <para>The wizard helps to get local copies of Guvnor repository
+ resources.</para>
+ </entry>
+ <entry>
+ <link linkend="resources_from_guvnor">Importing Guvnor Repository
+ Resources</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>A number of actions for working with files</para>
+ </entry>
+ <entry>
+ <para>The Guvnor actions (available through the <emphasis>
+ <property>Guvnor</property>
+ </emphasis> context menu on files) are provided for working with
+ files, both those associated with Guvnor repository master copies
+ and those not associated.</para>
+ </entry>
+ <entry>
+ <link linkend="actions">Actions for Local Guvnor Resources</link>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section id="how_to_start">
+ <title>How to start with Guvnor Tools</title>
+
+ <para><property>Guvnor Tools</property> is a part of the <property>JBoss Tools</property>
+ project. Thus to get started with <property>Guvnor Tools</property>, you should have the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Eclipse 3.4.x with Jboss Tools bundle of Eclipse plugins installed. How to
+ install JBoss Tools onto Eclipse you can find in the <ulink
+ url="&gsglink;#JBossToolsInstall">"JBoss Tools
+ Installation"</ulink> section.</para>
+ </listitem>
+
+ <listitem>
+ <para>JBoss Server 4.2 or higher with Guvnor repository deployed. Thus, you should
+ download <ulink
+ url="http://download.jboss.org/drools/release/5.0.0.25561.CR1/drools-5.0.0.CR1..."
+ >Guvnor CR1</ulink> and extract it to the deploy directory of the
+ server.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Now refer to the <link linkend="functionality_overview">"Functionality
+ Overview"</link> section to find out what you can do with Guvnor and
+ Eclipse synchronisation tool.</para>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Guvnor <ulink url="http://www.jboss.org/community/wiki/Guvnor">wiki page</ulink></para>
+ </listitem>
+
+ <listitem>
+ <para>Drools on <ulink url="http://www.jboss.org/drools/">JBoss.org</ulink></para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/tools/">JBoss Tools Home Page</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">The latest
+ JBossTools/JBDS documentation builds</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://docs.jboss.org/tools/">JBossTools/JBDS
+ release documentation</ulink></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+</chapter>
Added: trunk/drools/docs/guvnor_ref/pom.xml
===================================================================
--- trunk/drools/docs/guvnor_ref/pom.xml (rev 0)
+++ trunk/drools/docs/guvnor_ref/pom.xml 2009-05-12 12:50:47 UTC (rev 15227)
@@ -0,0 +1,107 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>guvnor-tools-ref-guide-${translation}</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>Guvnor_Tools_Reference_Guide</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.0-200803311251UTC-MPJDOCBOOK-8</version>
+
+ <extensions>true</extensions>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-docbook-xslt</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${pom.basedir}/en</sourceDirectory>
+ <imageResource>
+ <directory>${pom.basedir}/en</directory>
+ <includes>
+ <include>images/**/*</include>
+ </includes>
+ </imageResource>
+ <cssResource>
+ <directory>${pom.basedir}/${cssdir}</directory>
+ </cssResource>
+
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/pdf.xsl</stylesheetResource>
+ <finalName>${pom.name}.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>eclipse</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/eclipse.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+ <!-- could also locate the docbook dependency and inspect its version... -->
+ <docbookVersion>1.72.0</docbookVersion>
+ </options>
+
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <stylesdir>../../../documentation/jbosstools-docbook-xslt/src/main/resources/</stylesdir>
+ <cssdir>../../../documentation/jbosstools-jdocbook-style/src/main/org/css/</cssdir>
+ <translation>en-US</translation>
+ </properties>
+
+</project>
15 years, 5 months