Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2012-12-07 16:29:32 +0000
committerBrian Vosburgh2012-12-07 16:54:08 +0000
commit1e389f86244bbe4e970b7df05f27a1bcee415f13 (patch)
tree62f5d3bdae0deba8268f6feacdb75d48383e54e0 /jaxb/plugins/org.eclipse.jpt.jaxb.ui
parent931700a7d41a409b97fe68d1209b8022e8504525 (diff)
downloadwebtools.dali-1e389f86244bbe4e970b7df05f27a1bcee415f13.tar.gz
webtools.dali-1e389f86244bbe4e970b7df05f27a1bcee415f13.tar.xz
webtools.dali-1e389f86244bbe4e970b7df05f27a1bcee415f13.zip
rework images
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.ui')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/build.properties4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/text.gifbin349 -> 0 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/ovr16/error_ovr.gifbin82 -> 0 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-class.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/newclass_wiz.gif)bin598 -> 598 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-jaxb-project.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/new_jaxb_project_wiz.gif)bin612 -> 612 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-xsd.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/NewXSD.gif)bin364 -> 364 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/jaxb-facet.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/jaxb_facet.gif)bin220 -> 220 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/dtd-file.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/dtdfile.gif)bin351 -> 351 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/enum-constant.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/enum_constant.gif)bin124 -> 124 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-class.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_class.gif)bin1005 -> 1005 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-content.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_content.gif)bin220 -> 220 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-enum.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_enum.gif)bin981 -> 981 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-package.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/package.gif)bin950 -> 950 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-registry.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_registry.gif)bin1010 -> 1010 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.gif)bin1007 -> 1007 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.ico (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.ico)bin1150 -> 1150 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.gif)bin983 -> 983 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.ico (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.ico)bin1150 -> 1150 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/null-attribute-mapping.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/null-attribute-mapping.gif)bin911 -> 911 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-field.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_field.gif)bin124 -> 124 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-property.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_property.gif)bin193 -> 193 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-attribute.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-attribute.gif)bin951 -> 951 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-element.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-element.gif)bin973 -> 973 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-attribute.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-attribute.gif)bin937 -> 937 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-ref.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-ref.gif)bin995 -> 995 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-refs.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-refs.gif)bin978 -> 978 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element.gif)bin960 -> 960 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-elements.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-elements.gif)bin940 -> 940 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-transient.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-transient.gif)bin886 -> 886 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-value.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-value.gif)bin880 -> 880 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xsd-file.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/XSDFile.gif)bin574 -> 574 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/classes-gen-banner.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/newclass_wiz.gif)bin3213 -> 3213 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.gif)bin2787 -> 2787 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.png (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.png)bin2505 -> 2505 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/schema-gen-banner.gif (renamed from jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/NewXSD.gif)bin3162 -> 3162 bytes
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/plugin.xml13
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/JptJaxbUiImages.java99
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbMappingImageHelper.java73
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JptJaxbUiIcons.java50
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/GenericJaxb_2_1_NavigatorItemLabelProviderFactory.java24
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemLabelProvider.java35
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbEnumItemLabelProvider.java31
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbPersistentAttributeItemLabelProvider.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbTypeItemLabelProvider.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorContentProvider.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java35
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java23
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizardPage.java13
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SchemaWizardPage.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectFileOrXMLCatalogIdPanel.java6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectXMLCatalogIdPanel.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/XMLCatalogTableViewer.java159
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/facet/JaxbFacetPage.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/proj/JaxbProjectWizard.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizard.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizardPage.java2
56 files changed, 353 insertions, 281 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/build.properties b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/build.properties
index 0a95eca8b7..f31d33b992 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/build.properties
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/build.properties
@@ -1,5 +1,5 @@
################################################################################
-# Copyright (c) 2010, 2011 Oracle. All rights reserved.
+# Copyright (c) 2010, 2012 Oracle. All rights reserved.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v1.0, which accompanies this distribution
# and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -13,7 +13,7 @@ output.. = bin/
bin.includes = .,\
META-INF/,\
about.html,\
- icons/,\
+ images/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/text.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/text.gif
deleted file mode 100644
index efa7a38014..0000000000
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/text.gif
+++ /dev/null
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/ovr16/error_ovr.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/ovr16/error_ovr.gif
deleted file mode 100644
index 119dcccd5a..0000000000
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/ovr16/error_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/newclass_wiz.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-class.gif
index a1c6545cd6..a1c6545cd6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/newclass_wiz.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-class.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/new_jaxb_project_wiz.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-jaxb-project.gif
index b547717598..b547717598 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/new_jaxb_project_wiz.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-jaxb-project.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/NewXSD.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-xsd.gif
index b6efdd3d86..b6efdd3d86 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/NewXSD.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/buttons/new-xsd.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/jaxb_facet.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/jaxb-facet.gif
index e75a17c2d0..e75a17c2d0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/etool16/jaxb_facet.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/jaxb-facet.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/dtdfile.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/dtd-file.gif
index 3c0acadd2d..3c0acadd2d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/dtdfile.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/dtd-file.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/enum_constant.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/enum-constant.gif
index d4cb4254d9..d4cb4254d9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/enum_constant.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/enum-constant.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_class.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-class.gif
index baac236770..baac236770 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_class.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-class.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_content.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-content.gif
index e75a17c2d0..e75a17c2d0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_content.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-content.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_enum.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-enum.gif
index c73ed28e70..c73ed28e70 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_enum.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-enum.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/package.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-package.gif
index 6989b8df73..6989b8df73 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/package.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-package.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_registry.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-registry.gif
index 719e6057b3..719e6057b3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_registry.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-registry.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.gif
index 066461be61..066461be61 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.ico b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.ico
index 126f3e5c81..126f3e5c81 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_class.ico
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-class.ico
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.gif
index b634fb535f..b634fb535f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.ico b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.ico
index 6c3cceb0c4..6c3cceb0c4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/jaxb_transient_enum.ico
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/jaxb-transient-enum.ico
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/null-attribute-mapping.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/null-attribute-mapping.gif
index 70a9c23541..70a9c23541 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/null-attribute-mapping.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/null-attribute-mapping.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_field.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-field.gif
index d4cb4254d9..d4cb4254d9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_field.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-field.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_property.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-property.gif
index 7d24707ee8..7d24707ee8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/persistent_property.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/persistent-property.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-attribute.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-attribute.gif
index a5d9fb0dd6..a5d9fb0dd6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-attribute.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-attribute.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-element.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-element.gif
index f73d02bf43..f73d02bf43 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-any-element.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-any-element.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-attribute.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-attribute.gif
index 851ee72391..851ee72391 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-attribute.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-attribute.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-ref.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-ref.gif
index 3220052c41..3220052c41 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-ref.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-ref.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-refs.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-refs.gif
index 77e4d6a8bd..77e4d6a8bd 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element-refs.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element-refs.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element.gif
index 8c953dc928..8c953dc928 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-element.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-element.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-elements.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-elements.gif
index cb6aad6b16..cb6aad6b16 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-elements.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-elements.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-transient.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-transient.gif
index 3fd90cf828..3fd90cf828 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-transient.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-transient.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-value.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-value.gif
index 7145d6de8e..7145d6de8e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/xml-value.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xml-value.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/XSDFile.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xsd-file.gif
index cc0eeb7196..cc0eeb7196 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/obj16/XSDFile.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/objects/xsd-file.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/newclass_wiz.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/classes-gen-banner.gif
index 0ac0ee8635..0ac0ee8635 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/newclass_wiz.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/classes-gen-banner.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.gif
index d1873a1a51..d1873a1a51 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.png b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.png
index 95eb79dbb0..95eb79dbb0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/new_jaxb_prj_wiz.png
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/jaxb-project-banner.png
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/NewXSD.gif b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/schema-gen-banner.gif
index 390f48216a..390f48216a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/icons/full/wizban/NewXSD.gif
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/images/wizards/schema-gen-banner.gif
Binary files differ
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/plugin.xml b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/plugin.xml
index 75660d2549..b12082d60b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/plugin.xml
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/plugin.xml
@@ -49,7 +49,7 @@
name="%generateSchemaFromClassesName"
category="org.eclipse.jpt.jaxb"
class="org.eclipse.jpt.jaxb.ui.internal.wizards.schemagen.SchemaGeneratorWizard"
- icon="icons/full/etool16/NewXSD.gif">
+ icon="$nl$/images/buttons/new-xsd.gif">
<description>%generateSchemaFromClassesDesc</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
@@ -59,7 +59,7 @@
name="%generateClassesFromSchemaName"
category="org.eclipse.jpt.jaxb"
class="org.eclipse.jpt.jaxb.ui.internal.wizards.classesgen.ClassesGeneratorWizard"
- icon="icons/full/etool16/newclass_wiz.gif">
+ icon="$nl$/images/buttons/new-class.gif">
<description>%generateClassesFromSchemaDesc</description>
</wizard>
@@ -67,7 +67,7 @@
<wizard
id="org.eclipse.jpt.jaxb.ui.wizard.newJaxbProject"
name="%newJaxbProjectWizardName"
- icon="icons/full/etool16/new_jaxb_project_wiz.gif"
+ icon="$nl$/images/buttons/new-jaxb-project.gif"
category="org.eclipse.jpt.jaxb"
project="true">
<description>%newJaxbProjectWizardDesc</description>
@@ -84,7 +84,8 @@
id="jaxbCompletionProposals"
name="%jaxbCompletionProposals">
- <proposalCategory icon="icons/full/etool16/jaxb_facet.gif">
+ <proposalCategory
+ icon="$nl$/images/jaxb-facet.gif">
<enablement>
<with variable="project">
<adapt type="org.eclipse.core.resources.IProject">
@@ -236,7 +237,7 @@
name="%jaxbNavigatorContent"
priority="higher"
appearsBefore="org.eclipse.jst.servlet.ui.EnhancedJavaRendering"
- icon="icons/full/obj16/jaxb_content.gif"
+ icon="$nl$/images/objects/jaxb-content.gif"
activeByDefault="true"
contentProvider="org.eclipse.jpt.jaxb.ui.internal.navigator.JaxbNavigatorContentProvider"
labelProvider="org.eclipse.jpt.common.ui.internal.jface.NavigatorLabelProvider">
@@ -381,7 +382,7 @@
<extension
point="org.eclipse.wst.common.project.facet.ui.images">
- <image facet="jpt.jaxb" path="icons/full/etool16/jaxb_facet.gif"/>
+ <image facet="jpt.jaxb" path="$nl$/images/jaxb-facet.gif"/>
</extension>
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/JptJaxbUiImages.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/JptJaxbUiImages.java
new file mode 100644
index 0000000000..dec7afa977
--- /dev/null
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/JptJaxbUiImages.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.jaxb.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jpt.common.ui.JptCommonUiImages;
+import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
+
+/**
+ * Actually, just the image descriptors....
+ * <p>
+ * Code should use these constants to acquire (and release) the images provided
+ * by Dali. The images should be managed by a
+ * {@link org.eclipse.jface.resource.ResourceManager "local" resource manager}.
+ * <p>
+ * Also, the {@link org.eclipse.ui.IWorkbench Eclipse workbench} supplies more
+ * general purpose {@link org.eclipse.ui.ISharedImages images}.
+ *
+ * @see JptCommonUiImages
+ */
+// TODO add corresponding ImageDescriptorTest...
+@SuppressWarnings("nls")
+public final class JptJaxbUiImages {
+
+ // ********** directories **********
+
+ private static final String IMAGES_ = JptCommonUiImages.IMAGES_;
+ private static final String BUTTONS_ = JptCommonUiImages.BUTTONS_;
+ private static final String OBJECTS_ = JptCommonUiImages.OBJECTS_;
+ private static final String WIZARDS_ = JptCommonUiImages.WIZARDS_;
+
+
+ // ********** general **********
+
+ public static final ImageDescriptor JAXB_FACET = buildImageDescriptor(IMAGES_ + "jaxb-facet.gif");
+ public static final ImageDescriptor JAXB_CONTENT = buildImageDescriptor(OBJECTS_ + "jaxb-content.gif");
+
+ public static final ImageDescriptor DTD_FILE = buildImageDescriptor(OBJECTS_ + "dtd-file.gif");
+ public static final ImageDescriptor XSD_FILE = buildImageDescriptor(OBJECTS_ + "xsd-file.gif");
+
+
+ // ********** buttons **********
+
+ public static final ImageDescriptor NEW_CLASS = buildImageDescriptor(BUTTONS_ + "new-class.gif");
+ public static final ImageDescriptor NEW_JAXB_PROJECT = buildImageDescriptor(BUTTONS_ + "new-jaxb-project.gif");
+ public static final ImageDescriptor NEW_XSD = buildImageDescriptor(BUTTONS_ + "new-xsd.gif");
+
+
+ // ********** Java **********
+
+ public static final ImageDescriptor JAXB_PACKAGE = buildImageDescriptor(OBJECTS_ + "jaxb-package.gif");
+ public static final ImageDescriptor JAXB_CLASS = buildImageDescriptor(OBJECTS_ + "jaxb-class.gif");
+ public static final ImageDescriptor JAXB_ENUM = buildImageDescriptor(OBJECTS_ + "jaxb-enum.gif");
+ public static final ImageDescriptor JAXB_TRANSIENT_CLASS = buildImageDescriptor(OBJECTS_ + "jaxb-transient-class.gif");
+ public static final ImageDescriptor JAXB_TRANSIENT_ENUM = buildImageDescriptor(OBJECTS_ + "jaxb-transient-enum.gif");
+ public static final ImageDescriptor PERSISTENT_FIELD = buildImageDescriptor(OBJECTS_ + "persistent-field.gif");
+ public static final ImageDescriptor PERSISTENT_PROPERTY = buildImageDescriptor(OBJECTS_ + "persistent-property.gif");
+ public static final ImageDescriptor ENUM_CONSTANT = buildImageDescriptor(OBJECTS_ + "enum-constant.gif");
+
+
+ // ********** mappings **********
+
+ public static final ImageDescriptor JAXB_REGISTRY = buildImageDescriptor(OBJECTS_ + "jaxb-registry.gif");
+ public static final ImageDescriptor XML_ANY_ATTRIBUTE = buildImageDescriptor(OBJECTS_ + "xml-any-attribute.gif");
+ public static final ImageDescriptor XML_ANY_ELEMENT = buildImageDescriptor(OBJECTS_ + "xml-any-element.gif");
+ public static final ImageDescriptor XML_ATTRIBUTE = buildImageDescriptor(OBJECTS_ + "xml-attribute.gif");
+ public static final ImageDescriptor XML_ELEMENT = buildImageDescriptor(OBJECTS_ + "xml-element.gif");
+ public static final ImageDescriptor XML_ELEMENT_REF = buildImageDescriptor(OBJECTS_ + "xml-element-ref.gif");
+ public static final ImageDescriptor XML_ELEMENT_REFS = buildImageDescriptor(OBJECTS_ + "xml-element-refs.gif");
+ public static final ImageDescriptor XML_ELEMENTS = buildImageDescriptor(OBJECTS_ + "xml-elements.gif");
+ public static final ImageDescriptor XML_TRANSIENT = buildImageDescriptor(OBJECTS_ + "xml-transient.gif");
+ public static final ImageDescriptor XML_VALUE = buildImageDescriptor(OBJECTS_ + "xml-value.gif");
+ public static final ImageDescriptor NULL_ATTRIBUTE_MAPPING = buildImageDescriptor(OBJECTS_ + "null-attribute-mapping.gif");
+
+
+ // ********** wizard banners **********
+
+ public static final ImageDescriptor JAXB_PROJECT_BANNER = buildImageDescriptor(WIZARDS_ + "jaxb-project-banner.gif");
+ public static final ImageDescriptor SCHEMA_GEN_BANNER = buildImageDescriptor(WIZARDS_ + "schema-gen-banner.gif");
+ public static final ImageDescriptor CLASSES_GEN_BANNER = buildImageDescriptor(WIZARDS_ + "classes-gen-banner.gif");
+
+
+ // ********** misc **********
+
+ private static ImageDescriptor buildImageDescriptor(String path) {
+ return JptJaxbUiPlugin.instance().buildImageDescriptor(path);
+ }
+
+ private JptJaxbUiImages() {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbMappingImageHelper.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbMappingImageHelper.java
index b6836f5061..7e9866962b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbMappingImageHelper.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbMappingImageHelper.java
@@ -9,70 +9,45 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.ui.internal;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jpt.jaxb.core.MappingKeys;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
-import org.eclipse.swt.graphics.Image;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
-public class JaxbMappingImageHelper
-{
-//
-// public static Image imageForTypeMapping(String mappingKey) {
-// return JptUiPlugin.getImage(iconKeyForTypeMapping(mappingKey));
-// }
-//
-// public static String iconKeyForTypeMapping(String mappingKey) {
-// if (MappingKeys.NULL_TYPE_MAPPING_KEY == mappingKey) {
-// return JptUiIcons.NULL_TYPE_MAPPING;
-// }
-// else if (MappingKeys.ENTITY_TYPE_MAPPING_KEY.equals(mappingKey)) {
-// return JptUiIcons.ENTITY;
-// }
-// else if (MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY.equals(mappingKey)) {
-// return JptUiIcons.EMBEDDABLE;
-// }
-// else if (MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY.equals(mappingKey)) {
-// return JptUiIcons.MAPPED_SUPERCLASS;
-// }
-// return null;
-// }
+public class JaxbMappingImageHelper {
- public static Image imageForAttributeMapping(String mappingKey) {
- return JptJaxbUiPlugin.instance().getImage(iconKeyForAttributeMapping(mappingKey));
- }
-
- public static String iconKeyForAttributeMapping(String mappingKey) {
+ public static ImageDescriptor imageDescriptorForAttributeMapping(String mappingKey) {
if (MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY == mappingKey) {
- return JptJaxbUiIcons.NULL_ATTRIBUTE_MAPPING;
+ return JptJaxbUiImages.NULL_ATTRIBUTE_MAPPING;
}
- else if (MappingKeys.XML_ANY_ATTRIBUTE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ANY_ATTRIBUTE;
+ if (MappingKeys.XML_ANY_ATTRIBUTE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ANY_ATTRIBUTE;
}
- else if (MappingKeys.XML_ANY_ELEMENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ANY_ELEMENT;
+ if (MappingKeys.XML_ANY_ELEMENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ANY_ELEMENT;
}
- else if (MappingKeys.XML_ATTRIBUTE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ATTRIBUTE;
+ if (MappingKeys.XML_ATTRIBUTE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ATTRIBUTE;
}
- else if (MappingKeys.XML_ELEMENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ELEMENT;
+ if (MappingKeys.XML_ELEMENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ELEMENT;
}
- else if (MappingKeys.XML_ELEMENT_REF_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ELEMENT_REF;
+ if (MappingKeys.XML_ELEMENT_REF_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ELEMENT_REF;
}
- else if (MappingKeys.XML_ELEMENT_REFS_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ELEMENT_REFS;
+ if (MappingKeys.XML_ELEMENT_REFS_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ELEMENT_REFS;
}
- else if (MappingKeys.XML_ELEMENTS_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_ELEMENTS;
+ if (MappingKeys.XML_ELEMENTS_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_ELEMENTS;
}
- else if (MappingKeys.XML_TRANSIENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_TRANSIENT;
+ if (MappingKeys.XML_TRANSIENT_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_TRANSIENT;
}
- else if (MappingKeys.XML_VALUE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
- return JptJaxbUiIcons.XML_VALUE;
+ if (MappingKeys.XML_VALUE_ATTRIBUTE_MAPPING_KEY.equals(mappingKey)) {
+ return JptJaxbUiImages.XML_VALUE;
}
//return the JAXB_CONTENT icon instead of null, might as well have an icon if one is not defined
- return JptJaxbUiIcons.JAXB_CONTENT;
+ return JptJaxbUiImages.JAXB_CONTENT;
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JptJaxbUiIcons.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JptJaxbUiIcons.java
deleted file mode 100644
index 693c3ec187..0000000000
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JptJaxbUiIcons.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2010, 2011 Oracle. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0, which accompanies this distribution
-* and is available at http://www.eclipse.org/legal/epl-v10.html.
-*
-* Contributors:
-* Oracle - initial API and implementation
-*******************************************************************************/
-package org.eclipse.jpt.jaxb.ui.internal;
-
-@SuppressWarnings("nls")
-public class JptJaxbUiIcons {
-
- // **************** General icons **************************************
-
- public static final String JAXB_CONTENT = "full/obj16/jaxb_content";
- public static final String PACKAGE = "full/obj16/package";
-
- public static final String JAXB_CLASS = "full/obj16/jaxb_class";
- public static final String JAXB_ENUM = "full/obj16/jaxb_enum";
- public static final String JAXB_TRANSIENT_CLASS = "full/obj16/jaxb_transient_class";
- public static final String JAXB_TRANSIENT_ENUM = "full/obj16/jaxb_transient_enum";
- public static final String JAXB_REGISTRY = "full/obj16/jaxb_registry";
-
- public static final String XML_ANY_ATTRIBUTE = "full/obj16/xml-any-attribute";
- public static final String XML_ANY_ELEMENT = "full/obj16/xml-any-element";
- public static final String XML_ATTRIBUTE = "full/obj16/xml-attribute";
- public static final String XML_ELEMENT = "full/obj16/xml-element";
- public static final String XML_ELEMENT_REF = "full/obj16/xml-element-ref";
- public static final String XML_ELEMENT_REFS = "full/obj16/xml-element-refs";
- public static final String XML_ELEMENTS = "full/obj16/xml-elements";
-
- public static final String XML_TRANSIENT = "full/obj16/xml-transient";
- public static final String XML_VALUE = "full/obj16/xml-value";
- public static final String NULL_ATTRIBUTE_MAPPING = "full/obj16/null-attribute-mapping";
-
- public static final String PERSISTENT_FIELD = "full/obj16/persistent_field";
- public static final String PERSISTENT_PROPERTY = "full/obj16/persistent_property";
- public static final String ENUM_CONSTANT = "full/obj16/enum_constant";
-
-
- // **************** Wizard icons *******************************************
-
- public static final String SCHEMA_GEN = "full/wizban/NewXSD";
-
- public static final String SCHEMA_GEN_WIZ_BANNER = "full/wizban/NewXSD";
- public static final String CLASSES_GEN_WIZ_BANNER = "full/wizban/newclass_wiz";
- public static final String JAXB_WIZ_BANNER = "full/wizban/new_jaxb_prj_wiz";
-}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/GenericJaxb_2_1_NavigatorItemLabelProviderFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/GenericJaxb_2_1_NavigatorItemLabelProviderFactory.java
index 33cb0dea08..82da87aa75 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/GenericJaxb_2_1_NavigatorItemLabelProviderFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/GenericJaxb_2_1_NavigatorItemLabelProviderFactory.java
@@ -18,9 +18,8 @@ import org.eclipse.jpt.jaxb.core.context.JaxbEnum;
import org.eclipse.jpt.jaxb.core.context.JaxbEnumConstant;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
public class GenericJaxb_2_1_NavigatorItemLabelProviderFactory
@@ -65,11 +64,12 @@ public class GenericJaxb_2_1_NavigatorItemLabelProviderFactory
return null;
}
- protected ItemExtendedLabelProvider buildJaxbContextRootProvider(JaxbContextRoot root, @SuppressWarnings("unused") ItemExtendedLabelProvider.Manager manager) {
+ protected ItemExtendedLabelProvider buildJaxbContextRootProvider(JaxbContextRoot root, ItemExtendedLabelProvider.Manager manager) {
return new StaticItemExtendedLabelProvider(
- JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_CONTENT),
+ JptJaxbUiImages.JAXB_CONTENT,
JptJaxbUiMessages.JaxbContent_label,
- this.buildJaxbContextRootDescription(root)
+ this.buildJaxbContextRootDescription(root),
+ manager
);
}
@@ -81,18 +81,20 @@ public class GenericJaxb_2_1_NavigatorItemLabelProviderFactory
return sb.toString();
}
- protected ItemExtendedLabelProvider buildJaxbEnumConstantProvider(JaxbEnumConstant enumConstant, @SuppressWarnings("unused") ItemExtendedLabelProvider.Manager manager) {
+ protected ItemExtendedLabelProvider buildJaxbEnumConstantProvider(JaxbEnumConstant enumConstant, ItemExtendedLabelProvider.Manager manager) {
return new StaticItemExtendedLabelProvider(
- JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.ENUM_CONSTANT),
- enumConstant.getName()
+ JptJaxbUiImages.ENUM_CONSTANT,
+ enumConstant.getName(),
+ manager
);
}
- protected ItemExtendedLabelProvider buildJaxbPackageProvider(JaxbPackage pkg, @SuppressWarnings("unused") ItemExtendedLabelProvider.Manager manager) {
+ protected ItemExtendedLabelProvider buildJaxbPackageProvider(JaxbPackage pkg, ItemExtendedLabelProvider.Manager manager) {
return new StaticItemExtendedLabelProvider(
- JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.PACKAGE),
+ JptJaxbUiImages.JAXB_PACKAGE,
pkg.getName(),
- this.buildJaxbPackageDescription(pkg)
+ this.buildJaxbPackageDescription(pkg),
+ manager
);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemLabelProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemLabelProvider.java
index 6215510d1d..6570d9a396 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemLabelProvider.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemLabelProvider.java
@@ -9,7 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.ui.internal.jaxb21;
-import org.eclipse.jpt.common.ui.jface.ItemLabelProvider;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.common.utility.internal.model.value.AspectPropertyValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.StaticPropertyValueModel;
@@ -20,27 +21,25 @@ import org.eclipse.jpt.jaxb.core.context.JaxbClass;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbType;
import org.eclipse.jpt.jaxb.core.context.JaxbTypeMapping;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
-import org.eclipse.swt.graphics.Image;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
public class JaxbClassItemLabelProvider
extends JaxbTypeItemLabelProvider<JaxbClass>
{
- public JaxbClassItemLabelProvider(JaxbClass jaxbPersistentClass, ItemLabelProvider.Manager manager) {
+ public JaxbClassItemLabelProvider(JaxbClass jaxbPersistentClass, ItemExtendedLabelProvider.Manager manager) {
super(jaxbPersistentClass, manager);
}
@Override
- protected PropertyValueModel<Image> buildImageModel() {
- return new JaxbClassImageModel(this.item);
+ protected PropertyValueModel<ImageDescriptor> buildImageDescriptorModel() {
+ return new JaxbClassImageDescriptorModel(this.item);
}
- protected class JaxbClassImageModel
- extends AspectPropertyValueModelAdapter<JaxbClass, Image> {
+ protected class JaxbClassImageDescriptorModel
+ extends AspectPropertyValueModelAdapter<JaxbClass, ImageDescriptor> {
protected final PropertyValueModel<Boolean> isXmlRegistryModel;
@@ -51,7 +50,7 @@ public class JaxbClassItemLabelProvider
protected final PropertyChangeListener propertyChangeListener;
- public JaxbClassImageModel(JaxbClass subject) {
+ public JaxbClassImageDescriptorModel(JaxbClass subject) {
super(new StaticPropertyValueModel<JaxbClass>(subject));
this.isXmlRegistryModel = buildIsXmlRegistryModel();
this.mappingModel = buildMappingModel();
@@ -91,22 +90,20 @@ public class JaxbClassItemLabelProvider
// transform the subject's property change events into VALUE property change events
return new PropertyChangeListener() {
public void propertyChanged(PropertyChangeEvent event) {
- JaxbClassImageModel.this.aspectChanged();
+ JaxbClassImageDescriptorModel.this.aspectChanged();
}
};
}
@Override
- protected Image buildValue_() {
- if (this.mappingModel.getValue() != null) {
- if (this.isXmlTransientModel.getValue() == Boolean.TRUE) {
- return JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_TRANSIENT_CLASS);
- }
+ protected ImageDescriptor buildValue_() {
+ if ((this.mappingModel.getValue() != null) && (this.isXmlTransientModel.getValue() == Boolean.TRUE)) {
+ return JptJaxbUiImages.JAXB_TRANSIENT_CLASS;
}
- else if (this.isXmlRegistryModel.getValue() == Boolean.TRUE) {
- return JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_REGISTRY);
+ if (this.isXmlRegistryModel.getValue() == Boolean.TRUE) {
+ return JptJaxbUiImages.JAXB_REGISTRY;
}
- return JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_CLASS);
+ return JptJaxbUiImages.JAXB_CLASS;
}
@Override
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbEnumItemLabelProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbEnumItemLabelProvider.java
index bdef1b1d44..8eb8e7011b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbEnumItemLabelProvider.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbEnumItemLabelProvider.java
@@ -9,7 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.ui.internal.jaxb21;
-import org.eclipse.jpt.common.ui.jface.ItemLabelProvider;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.common.utility.internal.model.value.AspectPropertyValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.StaticPropertyValueModel;
@@ -19,27 +20,25 @@ import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jaxb.core.context.JaxbEnum;
import org.eclipse.jpt.jaxb.core.context.JaxbEnumMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbType;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
-import org.eclipse.swt.graphics.Image;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
public class JaxbEnumItemLabelProvider
extends JaxbTypeItemLabelProvider<JaxbEnum>
{
- public JaxbEnumItemLabelProvider(JaxbEnum jaxbEnum, ItemLabelProvider.Manager manager) {
+ public JaxbEnumItemLabelProvider(JaxbEnum jaxbEnum, ItemExtendedLabelProvider.Manager manager) {
super(jaxbEnum, manager);
}
@Override
- protected PropertyValueModel<Image> buildImageModel() {
- return new JaxbEnumImageModel(this.item);
+ protected PropertyValueModel<ImageDescriptor> buildImageDescriptorModel() {
+ return new JaxbEnumImageDescriptorModel(this.item);
}
- protected class JaxbEnumImageModel
- extends AspectPropertyValueModelAdapter<JaxbEnum, Image> {
+ protected class JaxbEnumImageDescriptorModel
+ extends AspectPropertyValueModelAdapter<JaxbEnum, ImageDescriptor> {
protected final PropertyValueModel<JaxbEnumMapping> mappingModel;
@@ -48,7 +47,7 @@ public class JaxbEnumItemLabelProvider
protected final PropertyChangeListener propertyChangeListener;
- public JaxbEnumImageModel(JaxbEnum subject) {
+ public JaxbEnumImageDescriptorModel(JaxbEnum subject) {
super(new StaticPropertyValueModel<JaxbEnum>(subject));
this.mappingModel = buildMappingModel();
this.isXmlTransientModel = buildIsXmlTransientModel();
@@ -78,19 +77,17 @@ public class JaxbEnumItemLabelProvider
// transform the subject's property change events into VALUE property change events
return new PropertyChangeListener() {
public void propertyChanged(PropertyChangeEvent event) {
- JaxbEnumImageModel.this.aspectChanged();
+ JaxbEnumImageDescriptorModel.this.aspectChanged();
}
};
}
@Override
- protected Image buildValue_() {
- if (this.mappingModel.getValue() != null) {
- if (this.isXmlTransientModel.getValue() == Boolean.TRUE) {
- return JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_TRANSIENT_ENUM);
- }
+ protected ImageDescriptor buildValue_() {
+ if ((this.mappingModel.getValue() != null) && (this.isXmlTransientModel.getValue() == Boolean.TRUE)) {
+ return JptJaxbUiImages.JAXB_TRANSIENT_ENUM;
}
- return JptJaxbUiPlugin.instance().getImage(JptJaxbUiIcons.JAXB_ENUM);
+ return JptJaxbUiImages.JAXB_ENUM;
}
@Override
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbPersistentAttributeItemLabelProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbPersistentAttributeItemLabelProvider.java
index 0c1ee41d75..9064b8febd 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbPersistentAttributeItemLabelProvider.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbPersistentAttributeItemLabelProvider.java
@@ -9,13 +9,13 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.ui.internal.jaxb21;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jpt.common.ui.internal.jface.AbstractItemExtendedLabelProvider;
-import org.eclipse.jpt.common.ui.jface.ItemLabelProvider;
+import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.ui.internal.JaxbMappingImageHelper;
-import org.eclipse.swt.graphics.Image;
public class JaxbPersistentAttributeItemLabelProvider
@@ -24,24 +24,24 @@ public class JaxbPersistentAttributeItemLabelProvider
protected final String text;
protected final String description;
- public JaxbPersistentAttributeItemLabelProvider(JaxbPersistentAttribute attribute, ItemLabelProvider.Manager manager) {
+ public JaxbPersistentAttributeItemLabelProvider(JaxbPersistentAttribute attribute, ItemExtendedLabelProvider.Manager manager) {
super(attribute, manager);
this.text = this.buildText();
this.description = this.buildDescription();
}
@Override
- protected PropertyValueModel<Image> buildImageModel() {
- return new PropertyAspectAdapter<JaxbPersistentAttribute, Image>(IMAGE_ASPECT_NAMES, this.item) {
+ protected PropertyValueModel<ImageDescriptor> buildImageDescriptorModel() {
+ return new PropertyAspectAdapter<JaxbPersistentAttribute, ImageDescriptor>(IMAGE_ASPECT_NAMES, this.item) {
@Override
- protected Image buildValue_() {
- return JaxbPersistentAttributeItemLabelProvider.this.buildImage(this.subject.getMappingKey());
+ protected ImageDescriptor buildValue_() {
+ return JaxbPersistentAttributeItemLabelProvider.this.buildImageDescriptor(this.subject.getMappingKey());
}
};
}
- protected Image buildImage(String mappingKey) {
- return JaxbMappingImageHelper.imageForAttributeMapping(mappingKey);
+ protected ImageDescriptor buildImageDescriptor(String mappingKey) {
+ return JaxbMappingImageHelper.imageDescriptorForAttributeMapping(mappingKey);
}
protected static final String[] IMAGE_ASPECT_NAMES = new String[] {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbTypeItemLabelProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbTypeItemLabelProvider.java
index e08db985c7..254717e202 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbTypeItemLabelProvider.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbTypeItemLabelProvider.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.jaxb.ui.internal.jaxb21;
import org.eclipse.jpt.common.ui.internal.jface.AbstractItemExtendedLabelProvider;
-import org.eclipse.jpt.common.ui.jface.ItemLabelProvider;
+import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.jaxb.core.context.JaxbType;
@@ -20,7 +20,7 @@ public abstract class JaxbTypeItemLabelProvider<I extends JaxbType>
protected final String text;
protected final String description;
- protected JaxbTypeItemLabelProvider(I jaxbType, ItemLabelProvider.Manager manager) {
+ protected JaxbTypeItemLabelProvider(I jaxbType, ItemExtendedLabelProvider.Manager manager) {
super(jaxbType, manager);
this.text = this.buildText();
this.description = this.buildDescription();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorContentProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorContentProvider.java
index efa396858a..e2dbcdb06e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorContentProvider.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorContentProvider.java
@@ -16,6 +16,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jpt.common.ui.internal.jface.NavigatorContentProvider;
@@ -70,6 +73,15 @@ public class JaxbNavigatorContentProvider
}
@Override
+ protected ResourceManager buildResourceManager() {
+ return new LocalResourceManager(this.getParentResourceManager());
+ }
+
+ protected ResourceManager getParentResourceManager() {
+ return JFaceResources.getResources();
+ }
+
+ @Override
public void inputChanged(Viewer v, Object oldInput, Object newInput) {
super.inputChanged(v, oldInput, newInput);
this.viewer = (StructuredViewer) v;
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
index cbd7f4b5bf..c84c2f3cb8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
@@ -35,6 +35,7 @@ import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ITableLabelProvider;
@@ -97,6 +98,7 @@ public class JaxbSchemasPropertiesPage
private static final int SIZING_SELECTION_PANE_WIDTH = 450;
+ private final ResourceManager resourceManager;
protected final ModifiablePropertyValueModel<IProject> projectModel;
@@ -109,8 +111,9 @@ public class JaxbSchemasPropertiesPage
private final ModifiableCollectionValueModel<Schema> schemasSelectionModel;
- public JaxbSchemasPropertiesPage() {
+ public JaxbSchemasPropertiesPage(ResourceManager resourceManager) {
super();
+ this.resourceManager = resourceManager;
this.projectModel = new SimplePropertyValueModel<IProject>();
this.jaxbProjectModel = new JaxbProjectModel(this.projectModel);
this.trigger = new BufferedModifiablePropertyValueModel.Trigger();
@@ -266,7 +269,8 @@ public class JaxbSchemasPropertiesPage
new AddEditSchemaDialog(
getShell(),
null,
- this.schemasModel.getAspectValue());
+ this.schemasModel.getAspectValue(),
+ this.resourceManager);
// opens the dialog - just returns if the user cancels it
if (dialog.open() == Window.CANCEL) {
@@ -296,7 +300,8 @@ public class JaxbSchemasPropertiesPage
new AddEditSchemaDialog(
getShell(),
schema,
- this.schemasModel.getAspectValue());
+ this.schemasModel.getAspectValue(),
+ this.resourceManager);
// opens the dialog - just returns if the user cancels it
if (dialog.open() == Window.CANCEL) {
@@ -412,12 +417,6 @@ public class JaxbSchemasPropertiesPage
this.trigger.reset();
}
- @Override
- public void dispose() {
-
- super.dispose();
- }
-
static class SchemasModel
extends AspectAdapter<JaxbProject, Collection<Schema>>
@@ -712,7 +711,9 @@ public class JaxbSchemasPropertiesPage
static class AddEditSchemaDialog
extends TitleAreaDialog {
- private Schema currentSchema;
+ private final ResourceManager resourceManager;
+
+ private final Schema currentSchema;
private String defaultMessage;
@@ -724,11 +725,12 @@ public class JaxbSchemasPropertiesPage
private final Mode mode;
- private Iterable<Schema> allSchemas;
+ private final Iterable<Schema> allSchemas;
- public AddEditSchemaDialog(Shell shell, Schema currentSchema, Iterable<Schema> allSchemas) {
+ public AddEditSchemaDialog(Shell shell, Schema currentSchema, Iterable<Schema> allSchemas, ResourceManager resourceManager) {
super(shell);
+ this.resourceManager = resourceManager;
this.currentSchema = currentSchema;
this.allSchemas = allSchemas;
this.location = new SimplePropertyValueModel<String>();
@@ -840,7 +842,7 @@ public class JaxbSchemasPropertiesPage
}
private void browseForSchemaLocation() {
- SchemaLocationDialog dialog = new SchemaLocationDialog(getShell());
+ SchemaLocationDialog dialog = new SchemaLocationDialog(getShell(), this.resourceManager);
// opens the dialog - just returns if the user cancels it
if (dialog.open() == Window.CANCEL) {
@@ -918,13 +920,16 @@ public class JaxbSchemasPropertiesPage
static class SchemaLocationDialog
extends TrayDialog {
+ private final ResourceManager resourceManager;
+
private SelectFileOrXMLCatalogIdPanel locationPanel;
private String location;
- public SchemaLocationDialog(Shell shell) {
+ public SchemaLocationDialog(Shell shell, ResourceManager resourceManager) {
super(shell);
+ this.resourceManager = resourceManager;
}
@@ -938,7 +943,7 @@ public class JaxbSchemasPropertiesPage
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
- this.locationPanel = new SelectFileOrXMLCatalogIdPanel(composite, StructuredSelection.EMPTY);
+ this.locationPanel = new SelectFileOrXMLCatalogIdPanel(composite, StructuredSelection.EMPTY, this.resourceManager);
this.locationPanel.setFilterExtensions(new String[] {".xsd"}); //$NON-NLS-1$
this.locationPanel.update();
this.locationPanel.setVisibleHelper(true);
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
index 6bfdc368ab..11a23559c4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
@@ -23,6 +23,9 @@ import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
@@ -35,7 +38,7 @@ import org.eclipse.jpt.jaxb.core.SchemaLibrary;
import org.eclipse.jpt.jaxb.core.internal.gen.ClassesGeneratorExtensionOptions;
import org.eclipse.jpt.jaxb.core.internal.gen.ClassesGeneratorOptions;
import org.eclipse.jpt.jaxb.core.xsd.XsdUtil;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
import org.eclipse.jpt.jaxb.ui.internal.gen.GenerateJaxbClassesJob;
import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
@@ -56,6 +59,7 @@ public class ClassesGeneratorWizard
private IJavaProject javaProject;
private IFile preselectedXsdFile;
+ private ResourceManager resourceManager;
protected IStructuredSelection selection;
private String destinationFolder;
@@ -93,11 +97,12 @@ public class ClassesGeneratorWizard
// ********** IWorkbenchWizard implementation **********
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
+ public void init(IWorkbench workbench, IStructuredSelection sel) {
+ this.resourceManager = new LocalResourceManager(JFaceResources.getResources(workbench.getDisplay()));
+ this.selection = sel;
this.setWindowTitle(JptJaxbUiMessages.ClassesGeneratorWizard_title);
- this.setDefaultPageImageDescriptor(JptJaxbUiPlugin.instance().buildImageDescriptor(JptJaxbUiIcons.CLASSES_GEN_WIZ_BANNER));
+ this.setDefaultPageImageDescriptor(JptJaxbUiImages.CLASSES_GEN_BANNER);
this.setNeedsProgressMonitor(true);
}
@@ -123,7 +128,7 @@ public class ClassesGeneratorWizard
}
if (this.preselectedXsdFile == null) {
- this.schemaWizardPage = new SchemaWizardPage(this.selection);
+ this.schemaWizardPage = new SchemaWizardPage(this.selection, this.resourceManager);
this.addPage(this.schemaWizardPage);
}
@@ -265,7 +270,7 @@ public class ClassesGeneratorWizard
}
private ClassesGeneratorWizardPage buildClassesGeneratorPage() {
- return new ClassesGeneratorWizardPage();
+ return new ClassesGeneratorWizardPage(this.resourceManager);
}
private ClassesGeneratorOptionsWizardPage buildClassesGeneratorOptionsPage() {
@@ -411,6 +416,12 @@ public class ClassesGeneratorWizard
message
);
}
+
+ @Override
+ public void dispose() {
+ this.resourceManager.dispose();
+ super.dispose();
+ }
static class OverwriteConfirmerDialog extends OptionalMessageDialog {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizardPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizardPage.java
index 7dd337f84e..5a985c6228 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizardPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizardPage.java
@@ -36,6 +36,8 @@ import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.IContentProvider;
@@ -90,8 +92,9 @@ public class ClassesGeneratorWizardPage extends NewTypeWizardPage {
static public final String[] bindingdFilesFilterExtensions = {".xjb",".xml",".xbd"}; //$NON-NLS-1$
public static final String ECLIPSELINK_PLATFORM_GROUP_ID = "eclipselink"; //$NON-NLS-1$
- public static final String HELP_CONTEXT_ID = "org.eclipse.jpt.ui.configure_jaxb_class_generation_dialog"; //$NON-NLS-1$
+ public static final String HELP_CONTEXT_ID = "org.eclipse.jpt.jaxb.ui.configure_jaxb_class_generation_dialog"; //$NON-NLS-1$
+ final ResourceManager resourceManager;
private SettingsGroup settingsGroup;
private String targetFolder;
@@ -102,9 +105,10 @@ public class ClassesGeneratorWizardPage extends NewTypeWizardPage {
// ********** constructor **********
- public ClassesGeneratorWizardPage() {
+ public ClassesGeneratorWizardPage(ResourceManager resourceManager) {
super(true, "Classes Generator"); //$NON-NLS-1$
+ this.resourceManager = resourceManager;
this.setDescription(JptJaxbUiMessages.ClassesGeneratorWizardPage_desc);
}
@@ -495,6 +499,7 @@ public class ClassesGeneratorWizardPage extends NewTypeWizardPage {
this.setMessage(message, WARNING);
}
+
// ********** inner class **********
// ********** SettingsGroup class **********
@@ -796,7 +801,7 @@ public class ClassesGeneratorWizardPage extends NewTypeWizardPage {
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
- this.locationPanel = new SelectFileOrXMLCatalogIdPanel(composite, StructuredSelection.EMPTY);
+ this.locationPanel = new SelectFileOrXMLCatalogIdPanel(composite, StructuredSelection.EMPTY, resourceManager);
this.locationPanel.setFilterExtensions(bindingdFilesFilterExtensions);
this.locationPanel.update();
this.locationPanel.setVisibleHelper(true);
@@ -822,4 +827,4 @@ public class ClassesGeneratorWizardPage extends NewTypeWizardPage {
return this.location;
}
}
-} \ No newline at end of file
+}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SchemaWizardPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SchemaWizardPage.java
index cb1a1d6c0a..36f4a33724 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SchemaWizardPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SchemaWizardPage.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.IWizardPage;
@@ -37,6 +38,7 @@ public class SchemaWizardPage
protected static final String[] browseXSDFilterExtensions = {".xsd"}; //$NON-NLS-1$
private final IStructuredSelection initialSelection;
+ private final ResourceManager resourceManager;
private IProject targetProject;
protected SelectFileOrXMLCatalogIdPanel selectSourcePanel;
@@ -60,10 +62,11 @@ public class SchemaWizardPage
// ********** constructor **********
- SchemaWizardPage(IStructuredSelection selection) {
+ SchemaWizardPage(IStructuredSelection selection, ResourceManager resourceManager) {
super("SchemaWizardPage"); //$NON-NLS-1$
this.initialSelection = selection;
+ this.resourceManager = resourceManager;
}
@@ -76,7 +79,7 @@ public class SchemaWizardPage
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
this.setControl(composite);
- this.selectSourcePanel = new SelectFileOrXMLCatalogIdPanel(composite, this.initialSelection);
+ this.selectSourcePanel = new SelectFileOrXMLCatalogIdPanel(composite, this.initialSelection, this.resourceManager);
this.selectSourcePanel.setLayoutData(new GridData(GridData.FILL_BOTH));
SelectFileOrXMLCatalogIdPanel.PanelListener listener = new SelectFileOrXMLCatalogIdPanel.PanelListener() {
@@ -207,7 +210,7 @@ public class SchemaWizardPage
return errorMessage;
}
- private void selectFileOrXMLCatalogIdPanelChanged() {
+ void selectFileOrXMLCatalogIdPanelChanged() {
String errorMessage = this.computeErrorMessage();
this.setErrorMessage(errorMessage);
this.setPageComplete(this.isPageComplete());
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectFileOrXMLCatalogIdPanel.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectFileOrXMLCatalogIdPanel.java
index c2e8fd787b..18c5de8042 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectFileOrXMLCatalogIdPanel.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectFileOrXMLCatalogIdPanel.java
@@ -13,12 +13,12 @@ package org.eclipse.jpt.jaxb.ui.internal.wizards.classesgen;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -48,7 +48,7 @@ public class SelectFileOrXMLCatalogIdPanel extends Composite implements Selectio
// ********** constructor **********
- public SelectFileOrXMLCatalogIdPanel(Composite parent, IStructuredSelection selection) {
+ public SelectFileOrXMLCatalogIdPanel(Composite parent, IStructuredSelection selection, ResourceManager resourceManager) {
super(parent, SWT.NONE);
// container group
@@ -78,7 +78,7 @@ public class SelectFileOrXMLCatalogIdPanel extends Composite implements Selectio
// Catalog
ICatalog xmlCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
- selectXMLCatalogIdPanel = new SelectXMLCatalogIdPanel(pageBook, xmlCatalog);
+ selectXMLCatalogIdPanel = new SelectXMLCatalogIdPanel(pageBook, xmlCatalog, resourceManager);
selectXMLCatalogIdPanel.getTableViewer().addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
updateCompletionStateChange();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectXMLCatalogIdPanel.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectXMLCatalogIdPanel.java
index 4e6f9da052..8ef27ff129 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectXMLCatalogIdPanel.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/SelectXMLCatalogIdPanel.java
@@ -14,10 +14,10 @@ package org.eclipse.jpt.jaxb.ui.internal.wizards.classesgen;
import java.util.Collection;
import java.util.List;
import java.util.Vector;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -36,7 +36,7 @@ public class SelectXMLCatalogIdPanel extends Composite {
protected XMLCatalogTableViewer tableViewer;
protected ICatalog fXmlCatalog;
- public SelectXMLCatalogIdPanel(Composite parent, ICatalog xmlCatalog) {
+ public SelectXMLCatalogIdPanel(Composite parent, ICatalog xmlCatalog, ResourceManager resourceManager) {
super(parent, SWT.NONE);
this.fXmlCatalog = xmlCatalog;
@@ -50,17 +50,17 @@ public class SelectXMLCatalogIdPanel extends Composite {
Label label = new Label(this, SWT.NONE);
label.setText(JptJaxbUiMessages.SchemaWizardPage_xmlCatalogTableTitle);
- tableViewer = createTableViewer(this);
+ tableViewer = createTableViewer(this, resourceManager);
tableViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
tableViewer.setInput("dummy"); //$NON-NLS-1$
}
- protected XMLCatalogTableViewer createTableViewer(Composite parent) {
+ protected XMLCatalogTableViewer createTableViewer(Composite parent, ResourceManager resourceManager) {
String headings[] = new String[2];
headings[0] = JptJaxbUiMessages.SchemaWizardPage_xmlCatalogKeyColumn;
headings[1] = JptJaxbUiMessages.SchemaWizardPage_xmlCatalogUriColumn;
- XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings) {
+ XMLCatalogTableViewer theTableViewer = new XMLCatalogTableViewer(parent, headings, resourceManager) {
protected void addXMLCatalogEntries(List list, ICatalogEntry[] entries) {
for (int i = 0; i < entries.length; i++) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/XMLCatalogTableViewer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/XMLCatalogTableViewer.java
index 5ba8b02336..af7914b23c 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/XMLCatalogTableViewer.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/XMLCatalogTableViewer.java
@@ -14,40 +14,37 @@ package org.eclipse.jpt.jaxb.ui.internal.wizards.classesgen;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
+import org.eclipse.jpt.common.ui.JptCommonUiImages;
+import org.eclipse.jpt.common.ui.internal.jface.OverlayImageDescriptor;
+import org.eclipse.jpt.common.ui.internal.jface.PluggableTextTableLabelProvider;
+import org.eclipse.jpt.common.ui.internal.jface.ResourceManagerTableLabelProvider;
+import org.eclipse.jpt.common.utility.internal.ObjectTools;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-
import com.ibm.icu.text.Collator;
-public class XMLCatalogTableViewer extends TableViewer {
-
+public abstract class XMLCatalogTableViewer
+ extends TableViewer
+{
protected static String ERROR_STATE_KEY = "errorstatekey"; //$NON-NLS-1$
- protected static Image dtdFileImage = JptJaxbUiPlugin.instance().getImage("full/obj16/dtdfile"); //$NON-NLS-1$
- protected static Image unknownFileImage = JptJaxbUiPlugin.instance().getImage("full/obj16/text"); //$NON-NLS-1$
- protected static Image xsdFileImage = JptJaxbUiPlugin.instance().getImage("full/obj16/XSDFile"); //$NON-NLS-1$
- protected static Image errorImage = JptJaxbUiPlugin.instance().getImage("full/ovr16/error_ovr"); //$NON-NLS-1$
- // ********** constructor **********
-
- public XMLCatalogTableViewer(Composite parent, String[] columnProperties) {
+ protected XMLCatalogTableViewer(Composite parent, String[] columnProperties, ResourceManager resourceManager) {
super(parent, SWT.FULL_SELECTION);
Table table = getTable();
@@ -68,34 +65,30 @@ public class XMLCatalogTableViewer extends TableViewer {
setColumnProperties(columnProperties);
setContentProvider(new CatalogEntryContentProvider());
- setLabelProvider(new CatalogEntryLabelProvider());
+ setLabelProvider(this.buildLabelProvider(resourceManager));
}
- public Collection getXMLCatalogEntries() {
- return null;
+ protected IBaseLabelProvider buildLabelProvider(ResourceManager resourceManager) {
+ return new ResourceManagerTableLabelProvider<Object>(
+ CATALOG_ENTRY_LABEL_IMAGE_DESCRIPTOR_TRANSFORMER,
+ CATALOG_ENTRY_LABEL_TEXT_TRANSFORMER,
+ resourceManager
+ );
}
- public void menuAboutToShow(IMenuManager menuManager) {
- Action action = new Action("hello") { //$NON-NLS-1$
- public void run() {
- System.out.println("run!"); //$NON-NLS-1$
- }
- };
- menuManager.add(action);
- }
+ protected abstract Collection getXMLCatalogEntries();
public void setFilterExtensions(String[] extensions) {
resetFilters();
addFilter(new XMLCatalogTableViewerFilter(extensions));
}
- // ********** inner class **********
-
- public class CatalogEntryContentProvider implements IStructuredContentProvider {
- public void dispose() {
- }
+ // ********** content provider **********
+ public class CatalogEntryContentProvider
+ implements IStructuredContentProvider
+ {
public Object[] getElements(Object element) {
Object[] array = getXMLCatalogEntries().toArray();
Comparator comparator = new Comparator() {
@@ -114,56 +107,80 @@ public class XMLCatalogTableViewer extends TableViewer {
}
public void inputChanged(Viewer viewer, Object old, Object newobj) {
+ // NOP
}
public boolean isDeleted(Object object) {
return false;
}
+
+ public void dispose() {
+ // NOP
+ }
}
- public class CatalogEntryLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- public Image getColumnImage(Object object, int columnIndex) {
- Image result = null;
- if (columnIndex == 0) {
- Image base = null;
- if (object instanceof ICatalogEntry) {
- ICatalogEntry catalogEntry = (ICatalogEntry) object;
- String uri = catalogEntry.getURI();
- if (uri.endsWith("dtd")) { //$NON-NLS-1$
- base = dtdFileImage;
- }
- else if (uri.endsWith("xsd")) { //$NON-NLS-1$
- base = xsdFileImage;
- }
- else {
- base = unknownFileImage;
- }
- if (base != null) {
- if (URIHelper.isReadableURI(uri, false)) {
- result = base;
- }
- else {
- // TODO... SSE port
- result = base;// imageFactory.createCompositeImage(base,
- // errorImage,
- // ImageFactory.BOTTOM_LEFT);
- }
- }
- }
+ // ********** label provider **********
+
+ protected static final PluggableTextTableLabelProvider.TextTransformer<Object> CATALOG_ENTRY_LABEL_TEXT_TRANSFORMER = new CatalogEntryLabelTextTransformer();
+ protected static class CatalogEntryLabelTextTransformer
+ implements PluggableTextTableLabelProvider.TextTransformer<Object>
+ {
+ public String transform(Object element, int columnIndex) {
+ return (element instanceof ICatalogEntry) ? this.transform((ICatalogEntry) element, columnIndex) : null;
+ }
+
+ protected String transform(ICatalogEntry catalogEntry, int columnIndex) {
+ return (columnIndex == 0) ?
+ catalogEntry.getKey() :
+ URIHelper.removePlatformResourceProtocol(catalogEntry.getURI());
+ }
+
+ @Override
+ public String toString() {
+ return ObjectTools.toString(this);
+ }
+ }
+
+ protected static final ResourceManagerTableLabelProvider.ImageDescriptorTransformer<Object> CATALOG_ENTRY_LABEL_IMAGE_DESCRIPTOR_TRANSFORMER = new CatalogEntryLabelImageDescriptorTransformer();
+ protected static class CatalogEntryLabelImageDescriptorTransformer
+ implements ResourceManagerTableLabelProvider.ImageDescriptorTransformer<Object>
+ {
+ public ImageDescriptor transform(Object element, int columnIndex) {
+ return (element instanceof ICatalogEntry) ? this.transform((ICatalogEntry) element, columnIndex) : null;
+ }
+
+ protected ImageDescriptor transform(ICatalogEntry catalogEntry, int columnIndex) {
+ return (columnIndex == 0) ? this.transform(catalogEntry) : null;
+ }
+
+ protected ImageDescriptor transform(ICatalogEntry catalogEntry) {
+ String uri = catalogEntry.getURI();
+ if (uri == null) {
+ return null;
}
- return result;
+ ImageDescriptor base = this.getBaseColumnImageDescriptor(uri);
+ return URIHelper.isReadableURI(uri, false) ? base : this.buildErrorImageDescriptor(base);
}
- public String getColumnText(Object object, int columnIndex) {
- String result = null;
- if (object instanceof ICatalogEntry) {
- ICatalogEntry catalogEntry = (ICatalogEntry) object;
- result = columnIndex == 0 ? catalogEntry.getKey() : catalogEntry.getURI();
- result = URIHelper.removePlatformResourceProtocol(result);
+ protected ImageDescriptor getBaseColumnImageDescriptor(String uri) {
+ uri = uri.toLowerCase();
+ if (uri.endsWith("dtd")) { //$NON-NLS-1$
+ return JptJaxbUiImages.DTD_FILE;
+ }
+ if (uri.endsWith("xsd")) { //$NON-NLS-1$
+ return JptJaxbUiImages.XSD_FILE;
}
- return result != null ? result : ""; //$NON-NLS-1$
+ return JptCommonUiImages.FILE;
+ }
+
+ protected ImageDescriptor buildErrorImageDescriptor(ImageDescriptor imageDescriptor) {
+ return new OverlayImageDescriptor(imageDescriptor, JptCommonUiImages.ERROR_OVERLAY, IDecoration.BOTTOM_LEFT);
+ }
+
+ @Override
+ public String toString() {
+ return ObjectTools.toString(this);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/facet/JaxbFacetPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/facet/JaxbFacetPage.java
index 013696b8ad..aec31a9dab 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/facet/JaxbFacetPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/facet/JaxbFacetPage.java
@@ -13,9 +13,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jpt.jaxb.core.internal.facet.JaxbFacetDataModelProperties;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
import org.eclipse.jst.common.project.facet.ui.libprov.LibraryProviderFrameworkUi;
import org.eclipse.swt.SWT;
@@ -39,7 +38,7 @@ public abstract class JaxbFacetPage
super(pageName);
setTitle(JptJaxbUiMessages.JaxbFacetWizardPage_title);
setDescription(JptJaxbUiMessages.JaxbFacetWizardPage_desc);
- setImageDescriptor(JptJaxbUiPlugin.instance().buildImageDescriptor(JptJaxbUiIcons.JAXB_WIZ_BANNER));
+ setImageDescriptor(JptJaxbUiImages.JAXB_PROJECT_BANNER);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/proj/JaxbProjectWizard.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/proj/JaxbProjectWizard.java
index 49dce38650..4a032e43e6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/proj/JaxbProjectWizard.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/proj/JaxbProjectWizard.java
@@ -11,9 +11,8 @@ package org.eclipse.jpt.jaxb.ui.internal.wizards.proj;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
-import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.jpt.jaxb.ui.internal.wizards.proj.model.JaxbProjectCreationDataModelProvider;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -38,7 +37,7 @@ public class JaxbProjectWizard
@Override
protected ImageDescriptor getDefaultPageImageDescriptor() {
- return JptJaxbUiPlugin.instance().buildImageDescriptor(JptJaxbUiIcons.JAXB_WIZ_BANNER);
+ return JptJaxbUiImages.JAXB_PROJECT_BANNER;
}
@Override
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizard.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizard.java
index 4344e0e10b..b6e3d54c8a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizard.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizard.java
@@ -35,7 +35,7 @@ import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.io.FileTools;
import org.eclipse.jpt.jaxb.core.internal.gen.SchemaGenerator;
import org.eclipse.jpt.jaxb.core.internal.operations.SchemaFileCreationDataModelProvider;
-import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiIcons;
+import org.eclipse.jpt.jaxb.ui.JptJaxbUiImages;
import org.eclipse.jpt.jaxb.ui.internal.JptJaxbUiMessages;
import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.osgi.util.NLS;
@@ -66,7 +66,7 @@ public class SchemaGeneratorWizard extends Wizard implements INewWizard
public SchemaGeneratorWizard() {
super();
setWindowTitle(JptJaxbUiMessages.SchemaGeneratorWizard_title);
- setDefaultPageImageDescriptor(JptJaxbUiPlugin.instance().buildImageDescriptor(JptJaxbUiIcons.SCHEMA_GEN_WIZ_BANNER));
+ setDefaultPageImageDescriptor(JptJaxbUiImages.SCHEMA_GEN_BANNER);
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizardPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizardPage.java
index 70aa054611..1c26bf0a18 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizardPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/schemagen/SchemaGeneratorWizardPage.java
@@ -68,7 +68,7 @@ public class SchemaGeneratorWizardPage extends AbstractJarDestinationWizardPage
private static final int SIZING_SELECTION_WIDGET_WIDTH = 480;
private static final int SIZING_SELECTION_WIDGET_HEIGHT = 150;
- public static final String HELP_CONTEXT_ID = "org.eclipse.jpt.ui.wizard_jaxbschema_classes"; //$NON-NLS-1$
+ public static final String HELP_CONTEXT_ID = "org.eclipse.jpt.jaxb.ui.wizard_jaxbschema_classes"; //$NON-NLS-1$
// ********** constructor **********

Back to the top