Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-10-10 07:47:32 -0400
committerUwe Stieber2013-10-10 07:47:32 -0400
commitcbd614b69cea6c3cfb54e6480e6554f681f81fc5 (patch)
tree48f7f67d7e338db77d76b9a9d02a9fb9ab57936b
parent73fcbe5fb3c44f09409c6fa4afa8e16cb3e79bc7 (diff)
downloadorg.eclipse.tcf-cbd614b69cea6c3cfb54e6480e6554f681f81fc5.tar.gz
org.eclipse.tcf-cbd614b69cea6c3cfb54e6480e6554f681f81fc5.tar.xz
org.eclipse.tcf-cbd614b69cea6c3cfb54e6480e6554f681f81fc5.zip
Target Explorer: Simplify desktop popup notifications
-rw-r--r--pom.xml1
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.feature/feature.xml7
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.project39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.core.prefs375
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.pde.prefs32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/META-INF/MANIFEST.MF16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/about.html28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/plugin.properties14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/Notification.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/AbstractNotification.java)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSink.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSinkEvent.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/activator/CoreBundleActivator.java57
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/interfaces/INotificationService.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.properties9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java178
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/icons/notifications-category.gifbin937 -> 0 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/NotificationsTestCase.java24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestFormTextFactoryDelegate.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestNotification.java98
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/META-INF/MANIFEST.MF12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/plugin.xml38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/factoryDelegates.exsd132
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/notifications.exsd311
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/activator/UIPlugin.java40
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/interfaces/IFormTextFactoryDelegate.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationAction.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java46
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationElement.java80
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationEvent.java116
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationHandler.java41
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationModel.java83
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationService.java131
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationSinkDescriptor.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationsExtensionReader.java142
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/events/EventListener.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/DefaultFormTextFactoryDelegate.java74
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/FactoryDelegateManager.java93
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AbstractNotificationPopup.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractNotificationPopup.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AnimationUtil.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/AnimationUtil.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/GradientColors.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/GradientColors.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/NotificationPopup.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/NotificationPopup.java)94
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/PopupNotificationSink.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/sink/PopupNotificationSink.java)61
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/ScalingHyperlink.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/ScalingHyperlink.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractUiNotification.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/IPreferenceKeys.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/PreferencesInitializer.java32
54 files changed, 741 insertions, 2193 deletions
diff --git a/pom.xml b/pom.xml
index 76dd2de0a..8f2c87e4f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,7 +46,6 @@
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.model</module>
- <module>target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.services</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler</module>
diff --git a/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml
index 100a7587d..d526fac69 100644
--- a/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.feature/feature.xml
@@ -122,13 +122,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.tcf.te.runtime.notifications"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.tcf.te.runtime.persistence"
download-size="0"
install-size="0"
diff --git a/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml
index 7e303a6bc..66ac83ec8 100644
--- a/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/feature.xml
@@ -86,13 +86,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.tcf.te.runtime.notifications.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.tcf.te.runtime.persistence.source"
download-size="0"
install-size="0"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.classpath
deleted file mode 100644
index ad32c83a7..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.project b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.project
deleted file mode 100644
index 22412e8cc..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tcf.te.runtime.notifications</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
- <filteredResources>
- <filter>
- <id>1381301931376</id>
- <name></name>
- <type>10</type>
- <matcher>
- <id>org.eclipse.ui.ide.multiFilter</id>
- <arguments>1.0-name-matches-false-false-target</arguments>
- </matcher>
- </filter>
- </filteredResources>
-</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c186f12ae..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,375 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=100
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=4
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=4
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
-org.eclipse.jdt.core.formatter.lineSplit=100
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.ui.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8f281bd38..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,56 +0,0 @@
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
-cleanup.add_missing_annotations=true
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_methods=false
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_missing_override_annotations_interface_methods=true
-cleanup.add_serial_version_id=false
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=false
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.correct_indentation=false
-cleanup.format_source_code=false
-cleanup.format_source_code_changes_only=false
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=false
-cleanup.make_private_fields_final=true
-cleanup.make_type_abstract_if_missing_method=false
-cleanup.make_variable_declarations_final=false
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=true
-cleanup.organize_imports=false
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=true
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_trailing_whitespaces=false
-cleanup.remove_trailing_whitespaces_all=true
-cleanup.remove_trailing_whitespaces_ignore_empty=false
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=false
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.sort_members=false
-cleanup.sort_members_all=false
-cleanup.use_blocks=false
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_parentheses_in_expressions=false
-cleanup.use_this_for_non_static_field_access=false
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=false
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=org.eclipse.jdt.ui.default.eclipse_clean_up_profile
-cleanup_settings_version=2
-eclipse.preferences.version=1
-formatter_profile=_Target Explorer Java STD
-formatter_settings_version=12
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.pde.prefs b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index cf80c8bc5..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=1
-compilers.p.missing-version-require-bundle=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/META-INF/MANIFEST.MF
deleted file mode 100644
index 6bacfad39..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tcf.te.runtime.notifications;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.tcf.te.runtime.notifications.activator.CoreBundleActivator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.tcf.te.runtime.services;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.runtime.notifications,
- org.eclipse.tcf.te.runtime.notifications.activator;x-internal:=true,
- org.eclipse.tcf.te.runtime.notifications.interfaces,
- org.eclipse.tcf.te.runtime.notifications.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/about.html b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/about.html
deleted file mode 100644
index 0f07cf034..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>May 24, 2012</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/build.properties
deleted file mode 100644
index d944674ba..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/plugin.properties
deleted file mode 100644
index 06dc28b9e..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-##################################################################################
-# Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
-# Wind River Systems - initial API and implementation
-##################################################################################
-
-pluginName = Target Explorer, Notifications Runtime plug-in
-providerName = Eclipse.org - Target Explorer
-
-# ***** Extension Points *****
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/pom.xml
deleted file mode 100644
index f1c73ba78..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/pom.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.tcf</groupId>
- <artifactId>tcf-parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../pom.xml</relativePath>
- </parent>
-
- <version>1.2.0.qualifier</version>
- <artifactId>org.eclipse.tcf.te.runtime.notifications</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/AbstractNotification.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/Notification.java
index d6a1a7e72..d6a1a7e72 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/AbstractNotification.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/Notification.java
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSink.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSink.java
deleted file mode 100644
index 3c37ab97d..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSink.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.runtime.notifications;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class NotificationSink {
-
- public abstract void notify(NotificationSinkEvent event);
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSinkEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSinkEvent.java
deleted file mode 100644
index 06084e14f..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/NotificationSinkEvent.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.runtime.notifications;
-
-import java.util.List;
-
-/**
- * @author Steffen Pingel
- */
-public class NotificationSinkEvent {
-
- private final List<AbstractNotification> notifications;
-
- public NotificationSinkEvent(List<AbstractNotification> notifications) {
- this.notifications = notifications;
- }
-
- public List<AbstractNotification> getNotifications() {
- return notifications;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/activator/CoreBundleActivator.java
deleted file mode 100644
index 411545165..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/activator/CoreBundleActivator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.runtime.notifications.activator;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator implements BundleActivator {
- // The bundle context
- private static BundleContext context;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getContext() != null && getContext().getBundle() != null) {
- return getContext().getBundle().getSymbolicName();
- }
- return "org.eclipse.tcf.te.runtime.notifications"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = bundleContext;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/interfaces/INotificationService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/interfaces/INotificationService.java
deleted file mode 100644
index a8760cb86..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/interfaces/INotificationService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.runtime.notifications.interfaces;
-
-import org.eclipse.tcf.te.runtime.notifications.AbstractNotification;
-import org.eclipse.tcf.te.runtime.services.interfaces.IService;
-
-/**
- * @author Steffen Pingel
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface INotificationService extends IService {
-
- /**
- * Single notification.
- *
- * @param notification The notification. Must not be <code>null</code>.
- */
- public void notify(AbstractNotification notification);
-
- /**
- * Multi notification.
- *
- * @param notifications The notifications. Must not be <code>null</code>.
- */
- public void notify(AbstractNotification[] notifications);
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.java
deleted file mode 100644
index 0b8a7558b..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.runtime.notifications.nls;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized strings management.
- */
-public class Messages extends NLS {
-
- // The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tcf.te.runtime.notifications.nls.Messages"; //$NON-NLS-1$
-
- /**
- * Static constructor.
- */
- static {
- // Load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- // **** Declare externalized string id's down here *****
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.properties
deleted file mode 100644
index 6db611c92..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.notifications/src/org/eclipse/tcf/te/runtime/notifications/nls/Messages.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
-# Wind River Systems - initial API and implementation
-###############################################################################
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java
new file mode 100644
index 000000000..30d860a9d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.runtime.events;
+
+import java.util.EventObject;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
+
+/**
+ * A notification event.
+ * <p>
+ * A notification is displayed in a desktop popup and is rendered as form
+ * text. The form text is created by an associated form text factory delegate.
+ * <p>
+ * The main listener for this event is registered by the <code>org.eclipse.tcf.te.ui.notifications</code>
+ * bundle. In headless environments, this event is ignored.
+ * <p>
+ * On construction time, the notification event remembers the current system time.
+ * This time stamp is used by the <code>compare</code> method to provide an natural
+ * ordering of the notifications.
+ */
+public class NotifyEvent extends EventObject implements Comparable<NotifyEvent> {
+ private static final long serialVersionUID = -7099295102694857196L;
+
+ /**
+ * Property defining the title text of the notification. The title text
+ * is typically the first line of the notification to be displayed.
+ * <p>
+ * <b>Note:</b> The location and the rendering of the title text inside
+ * the notification to display can be customized by contributing your
+ * own notification form text factory delegate.
+ */
+ public static final String PROP_TITLE_TEXT = "titleText"; //$NON-NLS-1$
+
+ /**
+ * Property defining the title image id of the notification. The title image
+ * is typically shown left of the title text in the first line of the
+ * notification to display.
+ * <p>
+ * <b>Note:</b> The location and the rendering of the title text inside
+ * the notification to display can be customized by contributing your
+ * own notification form text factory delegate.
+ */
+ public static final String PROP_TITLE_IMAGE_ID = "titleImageId"; //$NON-NLS-1$
+
+ /**
+ * Property defining the description text of the notification. The description
+ * text is typically shown as multi line text block below the title text.
+ * <p>
+ * <b>Note:</b> The location and the rendering of the title text inside
+ * the notification to display can be customized by contributing your
+ * own notification form text factory delegate.
+ */
+ public static final String PROP_DESCRIPTION_TEXT = "descriptionText"; //$NON-NLS-1$
+
+ // The creation time time stamp.
+ private final long creationTime = System.nanoTime();
+
+ private final String factoryId;
+ private final IPropertiesContainer properties;
+
+ /**
+ * Constructor
+ *
+ * @param source The event source. Must not be <code>null</code>.
+ * @param properties The properties to be consumed by the form text factory delegate. Must not be <code>null</code>.
+ */
+ public NotifyEvent(Object source, IPropertiesContainer properties) {
+ this(source, null, properties);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param source The event source. Must not be <code>null</code>.
+ * @param factoryId The unique id of the form text factory delegate or <code>null</code>.
+ * @param properties The properties to be consumed by the form text factory delegate. Must not be <code>null</code>.
+ */
+ public NotifyEvent(Object source, String factoryId, IPropertiesContainer properties) {
+ super(source);
+
+ this.factoryId = factoryId;
+
+ Assert.isNotNull(properties);
+ this.properties = properties;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo(NotifyEvent o) {
+ // If the other object is null, this object is always
+ // greater than the null object
+ if (o == null) return 1;
+ // Compare the creation times
+ return Long.valueOf(creationTime).compareTo(Long.valueOf(o.creationTime));
+ }
+
+ /**
+ * Returns the form text factory delegate id.
+ *
+ * @return The form text factory delegate id or <code>null<code>.
+ */
+ public String getFactoryId() {
+ return factoryId;
+ }
+
+ /**
+ * Returns the properties to be consumed by the form text factory delegate.
+ *
+ * @return The properties.
+ */
+ public IPropertiesContainer getProperties() {
+ return properties;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ int hashCode = Long.valueOf(creationTime).hashCode();
+ if (factoryId != null) hashCode ^= factoryId.hashCode();
+ hashCode ^= properties.hashCode();
+ return hashCode;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof NotifyEvent) {
+ return creationTime == ((NotifyEvent)obj).creationTime
+ && (factoryId != null ? factoryId.equals(((NotifyEvent)obj).factoryId) : ((NotifyEvent)obj).factoryId == null)
+ && properties.equals(((NotifyEvent)obj).properties);
+ }
+ return super.equals(obj);
+ }
+
+ /* (non-Javadoc)
+ * @see com.windriver.ide.common.core.event.WRAbstractNotificationEvent#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuffer toString = new StringBuffer(getClass().getName());
+
+ String prefix = ""; //$NON-NLS-1$
+ // if tracing the event, formating them a little bit better readable.
+ if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EVENTS)) {
+ prefix = "\n\t\t"; //$NON-NLS-1$
+ }
+
+ toString.append(prefix + "{creationTime="); //$NON-NLS-1$
+ toString.append(creationTime);
+ toString.append("," + prefix + "{factoryId="); //$NON-NLS-1$ //$NON-NLS-2$
+ toString.append(factoryId);
+ toString.append("," + prefix + "properties="); //$NON-NLS-1$ //$NON-NLS-2$
+ toString.append(properties);
+ toString.append("," + prefix + "source="); //$NON-NLS-1$ //$NON-NLS-2$
+ toString.append(source);
+ toString.append("}"); //$NON-NLS-1$
+
+ return toString.toString();
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
index 102bbbef4..dec616d91 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.tcf.te.runtime;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.concurrent;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.model;bundle-version="1.2.0",
- org.eclipse.tcf.te.runtime.notifications;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.services;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.stepper;bundle-version="1.2.0",
@@ -31,6 +30,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.tcf.te.ui.notifications;bundle-version="1.2.0",
org.eclipse.tcf.te.ui.views;bundle-version="1.2.0",
org.eclipse.ui;bundle-version="3.8.0",
+ org.eclipse.ui.forms;bundle-version="3.5.200",
org.junit;bundle-version="4.10.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/icons/notifications-category.gif b/target_explorer/plugins/org.eclipse.tcf.te.tests/icons/notifications-category.gif
deleted file mode 100644
index 7928be603..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/icons/notifications-category.gif
+++ /dev/null
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
index 4bcd81bf6..ed11a79bd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/plugin.xml
@@ -213,19 +213,10 @@
</extension>
<!-- Test notifications contributions -->
- <extension point="org.eclipse.tcf.te.ui.notifications.notifications">
- <category
- icon="icons/notifications-category.gif"
- id="org.eclipse.tcf.te.tests.category1"
- label="Test Notifications">
- </category>
- <event
- categoryId="org.eclipse.tcf.te.tests.category1"
- id="org.eclipse.tcf.te.tests.event1"
- label="Test Event">
- <defaultHandler
- sinkId="org.eclipse.tcf.te.ui.notifications.sink.popup">
- </defaultHandler>
- </event>
- </extension>
+ <extension point="org.eclipse.tcf.te.ui.notifications.factoryDelegates">
+ <delegate
+ class="org.eclipse.tcf.te.tests.notifications.TestFormTextFactoryDelegate"
+ id="org.eclipse.tcf.te.tests.delegates.TestFormTextFactoryDelegate">
+ </delegate>
+ </extension>
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/NotificationsTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/NotificationsTestCase.java
index fd795e74c..66bb4ca01 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/NotificationsTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/NotificationsTestCase.java
@@ -13,8 +13,10 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
-import org.eclipse.tcf.te.runtime.notifications.interfaces.INotificationService;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.events.EventManager;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
import org.eclipse.tcf.te.tests.CoreTestCase;
/**
@@ -41,20 +43,14 @@ public class NotificationsTestCase extends CoreTestCase {
// start with 'test'!
public void testNotifications() {
- // Get the service
- INotificationService service = ServiceManager.getInstance().getService(INotificationService.class);
- assertNotNull("Failed to get notification service instance.", service); //$NON-NLS-1$
+ IPropertiesContainer properties = new PropertiesContainer();
+ properties.setProperty(NotifyEvent.PROP_TITLE_TEXT, "VxWorks Simulator"); //$NON-NLS-1$
+ properties.setProperty(NotifyEvent.PROP_DESCRIPTION_TEXT, "Test notification issued by the unit test framework."); //$NON-NLS-1$
- TestNotification notification = new TestNotification("org.eclipse.tcf.te.tests.event1"); //$NON-NLS-1$
- assertNotNull("Failed to create test notification.", notification); //$NON-NLS-1$
+ NotifyEvent notification = new NotifyEvent(NotificationsTestCase.this, properties);
+ assertNotNull("Failed to create test notification event.", notification); //$NON-NLS-1$
- notification.setLabel("Test Notification Label"); //$NON-NLS-1$
- assertEquals("Notification label setter / getter does not match.", "Test Notification Label", notification.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$
-
- notification.setDescription("Test Notification Description"); //$NON-NLS-1$
- assertEquals("Notification description setter / getter does not match.", "Test Notification Description", notification.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
-
- service.notify(notification);
+ EventManager.getInstance().fireEvent(notification);
ExecutorsUtil.waitAndExecute(20000, null);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestFormTextFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestFormTextFactoryDelegate.java
new file mode 100644
index 000000000..cefc4add7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestFormTextFactoryDelegate.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.notifications;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
+import org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * Test notification form text factory delegate implementation.
+ */
+public class TestFormTextFactoryDelegate implements IFormTextFactoryDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate#populateFormText(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.ui.forms.widgets.FormText, org.eclipse.tcf.te.runtime.events.NotifyEvent)
+ */
+ @Override
+ public void populateFormText(FormToolkit toolkit, FormText widget, NotifyEvent event) {
+ Assert.isNotNull(toolkit);
+ Assert.isNotNull(widget);
+ Assert.isNotNull(event);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestNotification.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestNotification.java
deleted file mode 100644
index 49466d1b8..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/notifications/TestNotification.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tests.notifications;
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.ui.notifications.popup.AbstractUiNotification;
-
-/**
- * Test notification implementation.
- */
-public class TestNotification extends AbstractUiNotification {
- private String description;
- private String label;
-
- /**
- * Constructor
- *
- * @param eventId
- */
- public TestNotification(String eventId) {
- super(eventId);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.notifications.popup.AbstractUiNotification#getNotificationImage()
- */
- @Override
- public Image getNotificationImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.notifications.popup.AbstractUiNotification#getNotificationKindImage()
- */
- @Override
- public Image getNotificationKindImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.notifications.popup.AbstractUiNotification#open()
- */
- @Override
- public void open() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.notifications.AbstractNotification#getDate()
- */
- @Override
- public Date getDate() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.notifications.AbstractNotification#getDescription()
- */
- @Override
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.notifications.AbstractNotification#getLabel()
- */
- @Override
- public String getLabel() {
- return label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/META-INF/MANIFEST.MF
index 741d896dc..aedd3aa08 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/META-INF/MANIFEST.MF
@@ -6,7 +6,6 @@ Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.eclipse.tcf.te.ui.notifications.activator.UIPlugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.tcf.te.runtime;bundle-version="1.2.0",
- org.eclipse.tcf.te.runtime.notifications;bundle-version="1.2.0",
org.eclipse.tcf.te.runtime.services;bundle-version="1.2.0",
org.eclipse.ui;bundle-version="3.8.0",
org.eclipse.ui.forms;bundle-version="3.5.200"
@@ -14,11 +13,10 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.ui.notifications,
- org.eclipse.tcf.te.ui.notifications.activator;x-internal:=true,
+Export-Package: org.eclipse.tcf.te.ui.notifications.activator;x-internal:=true,
org.eclipse.tcf.te.ui.notifications.interfaces,
org.eclipse.tcf.te.ui.notifications.internal;x-internal:=true,
- org.eclipse.tcf.te.ui.notifications.nls;x-internal:=true,
- org.eclipse.tcf.te.ui.notifications.popup,
- org.eclipse.tcf.te.ui.notifications.popup.sink,
- org.eclipse.tcf.te.ui.notifications.preferences
+ org.eclipse.tcf.te.ui.notifications.internal.events,
+ org.eclipse.tcf.te.ui.notifications.internal.factory;x-internal:=true,
+ org.eclipse.tcf.te.ui.notifications.internal.popup;x-internal:=true,
+ org.eclipse.tcf.te.ui.notifications.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/plugin.xml
index 7e45ddb91..bef14a202 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/plugin.xml
@@ -3,31 +3,17 @@
<plugin>
<!-- Extension point declarations -->
- <extension-point id="notifications" name="Noification Provider" schema="schema/notifications.exsd"/>
-
-<!-- Notifications contributions -->
- <extension point="org.eclipse.tcf.te.ui.notifications.notifications">
- <sink
- class="org.eclipse.tcf.te.ui.notifications.popup.sink.PopupNotificationSink"
- id="org.eclipse.tcf.te.ui.notifications.sink.popup"
- label="Desktop Popup">
- </sink>
- </extension>
+ <extension-point id="factoryDelegates" name="Notification Form Text Factory Delegates" schema="schema/factoryDelegates.exsd"/>
-<!-- Preference initializer contributions -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tcf.te.ui.notifications.preferences.PreferencesInitializer"/>
- </extension>
-
-<!-- Service contributions -->
- <extension point="org.eclipse.tcf.te.runtime.services.services">
- <service
- class="org.eclipse.tcf.te.ui.notifications.internal.NotificationService"
- id="org.eclipse.tcf.te.ui.notifications.service">
- <serviceType
- bundleId="org.eclipse.tcf.te.runtime.notifications"
- class="org.eclipse.tcf.te.runtime.notifications.interfaces.INotificationService">
- </serviceType>
- </service>
- </extension>
+<!-- Event listener contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.eventListeners">
+ <eventListener
+ class="org.eclipse.tcf.te.ui.notifications.internal.events.EventListener"
+ forcePluginActivation="true">
+ <eventType
+ bundleId="org.eclipse.tcf.te.runtime"
+ class="org.eclipse.tcf.te.runtime.events.NotifyEvent">
+ </eventType>
+ </eventListener>
+ </extension>
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/factoryDelegates.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/factoryDelegates.exsd
new file mode 100644
index 000000000..ac5372bec
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/factoryDelegates.exsd
@@ -0,0 +1,132 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf.te.ui.notifications" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.tcf.te.ui.notifications" id="factoryDelegates" name="Notification Form Text Factory Delegates"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to contribute notification form text factory delegates.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="delegate" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="delegate">
+ <annotation>
+ <documentation>
+ Declares a notification form text factory delegate contribution.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The unique id of the notification form text factory delegate contribution.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class that implements &lt;code&gt;org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate&lt;/code&gt;.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Target Explorer 1.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ This is an example of the extension point usage:
+&lt;p&gt;
+&lt;pre&gt;&lt;code&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.runtime.model.factoryDelegates&quot;&gt;
+ &lt;delegate
+ id=&quot;org.eclipse.tcf.te.runtime.model.factory.modelNode&quot;
+ class=&quot;org.eclipse.tcf.te.runtime.model.internal.ModelNodeFactoryDelegate&quot;
+ label=&quot;Model Node Factory Delegate&quot;&gt;
+ &lt;nodeType class=&quot;org.eclipse.tcf.te.runtime.model.interfaces.IModelNode&quot;/&gt;
+ &lt;nodeType class=&quot;org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode&quot;/&gt;
+ &lt;/delegate&gt;
+ &lt;/extension&gt;
+&lt;/code&gt;&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ The provider of a model node factory delegate must implement &lt;samp&gt;org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate&lt;/samp&gt;.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2011 Wind River Systems, Inc. and others.
+
+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.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/notifications.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/notifications.exsd
deleted file mode 100644
index cc34dc1e8..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/schema/notifications.exsd
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tcf.te.ui.notifications" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tcf.te.ui.notifications" id="notifications" name="Notifications"/>
- </appinfo>
- <documentation>
- Provides support for event categories, types and sinks.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="category"/>
- <element ref="event"/>
- <element ref="sink"/>
- <element ref="eventMapping"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="event">
- <annotation>
- <documentation>
- Event types has an unique identifier, a label and optionally an icon and a category. Whenever a notification is triggered the identifier is used to determine how to present the notification to the user.
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="1">
- <element ref="description"/>
- <element ref="defaultHandler" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique event identifier.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- a 16x16 icon.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- a label describing the event type.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="categoryId" type="string">
- <annotation>
- <documentation>
- parent category identifier.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/category/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="category">
- <annotation>
- <documentation>
- Events can (and should) be organised into categories making them easy to locate in the user interface.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique event category identifier.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- a 16x16 icon.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- a label describing the category.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="sink">
- <annotation>
- <documentation>
- Notification sinks are used to handle events.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- a unique event sink identifier.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the event sink implementation.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.runtime.notifications.NotificationSink:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- a label describing the event sink.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description" type="string">
- <annotation>
- <appinfo>
- <meta.element translatable="true"/>
- </appinfo>
- <documentation>
- A description of the event type.
- </documentation>
- </annotation>
- </element>
-
- <element name="defaultHandler">
- <annotation>
- <documentation>
- One or more &lt;i&gt;defaultHandler&lt;/i&gt; elements may be added to an event for specifying which sink should handle the event. If none are specified all sinks will be used. Note that this element specifies a default setting that may be changed in user preferences.
-
-A similar effect is achieved by the &lt;i&gt;eventMapping&lt;/i&gt; extension.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="sinkId" type="string" use="required">
- <annotation>
- <documentation>
- Identifier of the sink that should handle the event.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/sink/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="eventMapping">
- <annotation>
- <documentation>
- Event mappings are used to map one ore more events to a sink. Note that this element specifies a default setting that may be changed in user preferences.
-
-Also see the &lt;i&gt;defaultHandler&lt;/i&gt; element of &lt;i&gt;event&lt;/i&gt; declarations.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="sinkId" type="string" use="required">
- <annotation>
- <documentation>
- Identifier of the sink that should handle the event.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.notifications.notifications/sink/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="eventIds" type="string" use="required">
- <annotation>
- <documentation>
- a comma separated list of event identifiers that will be mapped to the notification sink. The &quot;*&quot; wildcard can be used so that multiple events can be mapped to one sink.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- Following is an example of use:
-&lt;pre&gt;
- &lt;extension
- point=&quot;org.eclipse.tcf.te.ui.notifications.notifications&quot;&gt;
- &lt;event
- categoryId=&quot;org.eclipse.mylyn.builds.ui.category.Builds&quot;
- id=&quot;org.eclipse.mylyn.builds.ui.events.BuildServiceChanged&quot;
- label=&quot;Build Service Changed&quot;&gt;
- &lt;description&gt;
- This event is triggered when the status of a build service is changed. For instance a new server is discovered or is no longer available.
- &lt;/description&gt;
- &lt;defaultHandler
- sinkId=&quot;org.eclipse.mylyn.internal.builds.ui.view.NotificationSinkProxy&quot;/&gt;
- &lt;/category&gt;
- &lt;/event&gt;
- &lt;category
- icon=&quot;icons/eview16/build-view.png&quot;
- id=&quot;org.eclipse.mylyn.builds.ui.category.Builds&quot;
- label=&quot;Builds&quot;&gt;
- &lt;/category&gt;
- &lt;sink
- class=&quot;org.eclipse.mylyn.internal.builds.ui.view.NotificationSinkProxy&quot;
- id=&quot;org.eclipse.mylyn.builds.ui.sink.View&quot;
- label=&quot;Builds View&quot;&gt;
- &lt;/sink&gt;
- &lt;eventMapping
- eventIds=&quot;org.eclipse.mylyn.builds.ui.events.*&quot;
- sinkId=&quot;org.eclipse.tcf.te.ui.notifications.sink.Popup&quot;&gt;
- &lt;/eventMapping&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-
-This example will declare a new event and assign it to the builds view notification sink. The category for the event is also declared in addition to the builds view notification sink. The last configuration element declares a mapping between all build event types and the popup notification sink.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- The value of the class attribute in sink must represent a class
-that implements &lt;samp&gt;org.eclipse.tcf.te.runtime.notifications.NotificationSink&lt;/samp&gt;.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2010, 2013 Tasktop Technologies and others.
-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
- </documentation>
- </annotation>
-
-</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/activator/UIPlugin.java
index 3712b8089..256b5b5cb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/activator/UIPlugin.java
@@ -16,9 +16,8 @@ import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.eclipse.tcf.te.ui.notifications.interfaces.ImageConsts;
-import org.eclipse.tcf.te.ui.notifications.internal.NotificationModel;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -31,10 +30,8 @@ public class UIPlugin extends AbstractUIPlugin {
// The trace handler instance
private static volatile TraceHandler traceHandler;
- private volatile NotificationModel model;
-
- // The form colors instance
- private volatile FormColors formColors = null;
+ // The form toolkit instance
+ private volatile FormToolkit formToolkit = null;
/**
* The constructor
@@ -74,28 +71,15 @@ public class UIPlugin extends AbstractUIPlugin {
}
/**
- * Returns the notification model instance.
- *
- * @return The notification model.
- */
- public NotificationModel getModel() {
- if (model == null) {
- model = new NotificationModel();
- }
- return model;
- }
-
- /**
- * Returns a form colors instance.
+ * Returns a form toolkit instance.
*
- * @return The form colors instance.
+ * @return The form toolkit instance.
*/
- public FormColors getFormColors() {
- if (formColors == null) {
- formColors = new FormColors(PlatformUI.getWorkbench().getDisplay());
- formColors.markShared();
+ public FormToolkit getFormToolkit() {
+ if (formToolkit == null) {
+ formToolkit = new FormToolkit(PlatformUI.getWorkbench().getDisplay());
}
- return formColors;
+ return formToolkit;
}
/* (non-Javadoc)
@@ -112,9 +96,9 @@ public class UIPlugin extends AbstractUIPlugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
- if (formColors != null) {
- formColors.dispose();
- formColors = null;
+ if (formToolkit != null) {
+ formToolkit.dispose();
+ formToolkit = null;
}
plugin = null;
traceHandler = null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/interfaces/IFormTextFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/interfaces/IFormTextFactoryDelegate.java
new file mode 100644
index 000000000..44c9ecd14
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/interfaces/IFormTextFactoryDelegate.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.notifications.interfaces;
+
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+
+/**
+ * Interface to be implemented by notification form text factory delegates.
+ */
+public interface IFormTextFactoryDelegate {
+
+ /**
+ * Populate the given form text widget based on the given notification event.
+ * <p>
+ * See {@link FormText} for details.
+ *
+ * @param toolkit The form toolkit. Must not be <code>null</code>.
+ * @param widget The form text widget. Must not be <code>null</code>.
+ * @param event The notification event. Must not be <code>null</code>.
+ */
+ public void populateFormText(FormToolkit toolkit, FormText widget, NotifyEvent event);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationAction.java
deleted file mode 100644
index 34f46ac55..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSink;
-
-/**
- * Describes how a {@link NotificationEvent} is handled. {@link NotificationAction}s store enablement and parameters
- * that determine how the {@link NotificationSink} executes the action.
- *
- * @author Steffen Pingel
- */
-public class NotificationAction {
-
- private boolean selected;
-
- private final NotificationSinkDescriptor sinkDescriptor;
-
- public NotificationAction(NotificationSinkDescriptor sinkDescriptor) {
- Assert.isNotNull(sinkDescriptor);
- this.sinkDescriptor = sinkDescriptor;
- }
-
- public NotificationSinkDescriptor getSinkDescriptor() {
- return sinkDescriptor;
- }
-
- public boolean isSelected() {
- return selected;
- }
-
- public void setSelected(boolean selected) {
- this.selected = selected;
- }
-
- @Override
- public String toString() {
- return sinkDescriptor.getLabel();
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java
deleted file mode 100644
index c9a261922..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationCategory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-/**
- * @author Steffen Pingel
- */
-public class NotificationCategory extends NotificationElement {
-
- private final List<NotificationEvent> events;
-
- public NotificationCategory(IConfigurationElement element) {
- super(element);
- this.events = new ArrayList<NotificationEvent>();
- }
-
- public void addEvent(NotificationEvent event) {
- event.setCategory(this);
- events.add(event);
- }
-
- public List<NotificationEvent> getEvents() {
- return events;
- }
-
- public void removeEvent(NotificationEvent event) {
- event.setCategory(null);
- events.remove(event);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationElement.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationElement.java
deleted file mode 100644
index 7de3b44ee..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * @author Steffen Pingel
- */
-public class NotificationElement {
-
- protected final IConfigurationElement element;
-
- private ImageDescriptor iconDescriptor;
-
- private final String id;
-
- private final String label;
-
- public NotificationElement(IConfigurationElement element) {
- Assert.isNotNull(element);
- this.element = element;
- this.id = element.getAttribute("id"); //$NON-NLS-1$
- this.label = element.getAttribute("label"); //$NON-NLS-1$
- }
-
- public String getId() {
- return id;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (iconDescriptor == null) {
- if (element != null) {
- String iconPath = element.getAttribute("icon"); //$NON-NLS-1$
- if (iconPath != null) {
- iconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor().getName(), iconPath);
- }
- }
- }
- return iconDescriptor;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getPluginId() {
- return element.getContributor().getName();
- }
-
- public IStatus validate() {
- if (id == null) {
- return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- NLS.bind("Extension {0} contributed by {1} does not specify id attribute", element.getNamespaceIdentifier(), getPluginId())); //$NON-NLS-1$
- }
- else if (label == null) {
- return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- NLS.bind("Extension {0} contributed by {1} does not specify label attribute", element.getNamespaceIdentifier(), getPluginId())); //$NON-NLS-1$
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationEvent.java
deleted file mode 100644
index 195072533..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationEvent.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Itema AS - bug 331424 handle default event-sink action associations
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSink;
-
-/**
- * Describes an event that is handled through a notification. The handling of event is stored in
- * {@link NotificationAction} objects that delegate to {@link NotificationSink} objects for the handling of actual
- * events.
- *
- * @author Steffen Pingel
- * @author Torkild U. Resheim
- */
-public class NotificationEvent extends NotificationElement {
-
- private static final String EXTENSION_POINT_ID = "org.eclipse.tcf.te.ui.notifications.notifications"; //$NON-NLS-1$
-
- private NotificationCategory category;
-
- private final ArrayList<String> defaultSinks;
-
- /**
- * Tests whether or not the event should per default be handled by the sink with the specified identifier.
- *
- * @param sinkId
- * the sink identifier
- * @return <code>true</code> if the
- */
- public boolean defaultHandledBySink(String sinkId) {
- if (defaultSinks.isEmpty() || defaultSinks.contains(sinkId)) {
- return true;
- }
- return false;
- }
-
- public NotificationEvent(IConfigurationElement element) {
- super(element);
- defaultSinks = new ArrayList<String>();
- IConfigurationElement[] children = element.getChildren("defaultHandler"); //$NON-NLS-1$
- for (IConfigurationElement child : children) {
- defaultSinks.add(child.getAttribute("sinkId")); //$NON-NLS-1$
- }
- doEventMappings();
- }
-
- private void doEventMappings() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint(EXTENSION_POINT_ID);
- if (point != null) {
- IConfigurationElement[] elements = point.getConfigurationElements();
- for (IConfigurationElement mapping : elements) {
- if (mapping.getName().equals("eventMapping")) { //$NON-NLS-1$
- String eventIds = mapping.getAttribute("eventIds"); //$NON-NLS-1$
- String[] list = eventIds.split(","); //$NON-NLS-1$
- for (String item : list) {
- if (wildCardMatch(getId(), item)) {
- defaultSinks.add(mapping.getAttribute("sinkId")); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
-
- private boolean wildCardMatch(String text, String pattern) {
- String[] cards = pattern.split("\\*"); //$NON-NLS-1$
- for (String card : cards) {
- int idx = text.indexOf(card);
- if (idx == -1) {
- return false;
- }
- text = text.substring(idx + card.length());
- }
-
- return true;
- }
-
- public NotificationCategory getCategory() {
- return category;
- }
-
- public String getCategoryId() {
- return element.getAttribute("categoryId"); //$NON-NLS-1$
- }
-
- public String getDescription() {
- IConfigurationElement[] children = element.getChildren("description"); //$NON-NLS-1$
- if (children.length > 0) {
- return children[0].getValue();
- }
- return ""; //$NON-NLS-1$
- }
-
- public void setCategory(NotificationCategory category) {
- this.category = category;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationHandler.java
deleted file mode 100644
index cd15cf446..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationHandler.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import java.util.List;
-
-/**
- * Manages actions that are triggered when a {@link NotificationEvent} occurs.
- *
- * @author Steffen Pingel
- */
-public class NotificationHandler {
-
- private final List<NotificationAction> actions;
-
- private final NotificationEvent event;
-
- public NotificationHandler(NotificationEvent event, List<NotificationAction> actions) {
- this.event = event;
- this.actions = actions;
- }
-
- public List<NotificationAction> getActions() {
- return actions;
- }
-
- public NotificationEvent getEvent() {
- return event;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationModel.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationModel.java
deleted file mode 100644
index 6b4e7763a..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationModel.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Itema AS - bug 330064 notification filtering and model persistence
- * Itema AS - bug 331424 handle default event-sink action associations
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Steffen Pingel
- * @author Torkild U. Resheim
- */
-public class NotificationModel {
-
- private Map<String, NotificationHandler> handlerByEventId;
-
- /**
- * Constructor
- */
- public NotificationModel() {
- this.handlerByEventId = new HashMap<String, NotificationHandler>();
- // We need the handlerByEventId map to be populated early
- for (NotificationCategory category : getCategories()) {
- for (NotificationEvent event : category.getEvents()) {
- getOrCreateNotificationHandler(event);
- }
- }
- }
-
- public Collection<NotificationCategory> getCategories() {
- return NotificationsExtensionReader.getCategories();
- }
-
- public NotificationHandler getNotificationHandler(String eventId) {
- return handlerByEventId.get(eventId);
- }
-
- public NotificationHandler getOrCreateNotificationHandler(NotificationEvent event) {
- NotificationHandler handler = getNotificationHandler(event.getId());
- if (handler == null) {
- handler = new NotificationHandler(event, getActions(event));
- handlerByEventId.put(event.getId(), handler);
- }
- return handler;
- }
-
- private List<NotificationAction> getActions(NotificationEvent event) {
- List<NotificationSinkDescriptor> descriptors = NotificationsExtensionReader.getSinks();
- List<NotificationAction> actions = new ArrayList<NotificationAction>(descriptors.size());
- for (NotificationSinkDescriptor descriptor : descriptors) {
- NotificationAction action = new NotificationAction(descriptor);
- if (event.defaultHandledBySink(descriptor.getId())) {
- action.setSelected(true);
- }
- actions.add(action);
- }
- return actions;
- }
-
- public boolean isSelected(NotificationEvent event) {
- NotificationHandler handler = getOrCreateNotificationHandler(event);
- for (NotificationAction action : handler.getActions()) {
- if (action.isSelected()) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationService.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationService.java
index 0f95e8f97..dfff769f6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationService.java
@@ -1,100 +1,81 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Tasktop Technologies - initial API and implementation
- * Itema AS - bug 330064 notification filtering and model persistence
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
+ * Wind River Systems - initial API and implementation
*******************************************************************************/
-
package org.eclipse.tcf.te.ui.notifications.internal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map.Entry;
-
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.notifications.AbstractNotification;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSink;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSinkEvent;
-import org.eclipse.tcf.te.runtime.notifications.interfaces.INotificationService;
-import org.eclipse.tcf.te.runtime.services.AbstractService;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-import org.eclipse.tcf.te.ui.notifications.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.ui.notifications.internal.popup.PopupNotificationSink;
/**
- * @author Steffen Pingel
- * @author Torkild U. Resheim
+ * Notification service implementation.
*/
-public class NotificationService extends AbstractService implements INotificationService {
+public class NotificationService {
+ // Reference to the popup notification sink we use exclusively
+ /* default */ final PopupNotificationSink sink = new PopupNotificationSink();
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.notifications.interfaces.INotificationService#notify(org.eclipse.tcf.te.runtime.notifications.AbstractNotification)
+ /*
+ * Thread save singleton instance creation.
*/
- @Override
- public void notify(AbstractNotification notification) {
- notify(new AbstractNotification[] { notification });
+ private static class LazyInstance {
+ public static NotificationService instance = new NotificationService();
}
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.notifications.interfaces.INotificationService#notify(org.eclipse.tcf.te.runtime.notifications.AbstractNotification[])
+ /**
+ * Constructor.
*/
- @Override
- public void notify(AbstractNotification[] notifications) {
- // Return if notifications are not globally enabled.
- if (!UIPlugin.getDefault().getPreferenceStore().getBoolean(IPreferenceKeys.PREF_SERVICE_ENABLED)) {
- return;
- }
+ NotificationService() {
+ super();
+ }
+
+ /**
+ * Returns the singleton instance of the notification service.
+ */
+ public static NotificationService getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /**
+ * Shows a single notification.
+ *
+ * @param event The notification event. Must not be <code>null</code>.
+ */
+ public void notify(NotifyEvent event) {
+ Assert.isNotNull(event);
+ notify(new NotifyEvent[] { event });
+ }
+
+ /**
+ * Shows a set of notifications.
+ *
+ * @param events The notification events. Must not be <code>null</code>.
+ */
+ public void notify(final NotifyEvent[] events) {
+ Assert.isNotNull(events);
+
+ SafeRunner.run(new ISafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ sink.notify(events);
+ }
- // For each sink assemble a list of notifications that are not blocked
- // and pass these along.
- HashMap<NotificationSink, ArrayList<AbstractNotification>> filtered = new HashMap<NotificationSink, ArrayList<AbstractNotification>>();
- for (AbstractNotification notification : notifications) {
- String id = notification.getEventId();
- NotificationHandler handler = UIPlugin.getDefault().getModel().getNotificationHandler(id);
- if (handler != null) {
- List<NotificationAction> actions = handler.getActions();
- for (NotificationAction action : actions) {
- if (action.isSelected()) {
- NotificationSink sink = action.getSinkDescriptor().getSink();
- if (sink != null) {
- ArrayList<AbstractNotification> list = filtered.get(sink);
- if (list == null) {
- list = new ArrayList<AbstractNotification>();
- filtered.put(sink, list);
- }
- list.add(notification);
- }
- }
- }
+ @Override
+ public void handleException(Throwable e) {
+ UIPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, UIPlugin.getUniqueIdentifier(), "Sink failed: " + sink.getClass(), e)); //$NON-NLS-1$
}
- }
- // Go through all the sinks that have notifications to display and let
- // them do their job.
- for (Entry<NotificationSink, ArrayList<AbstractNotification>> entry : filtered.entrySet()) {
- final NotificationSink sink = entry.getKey();
- final NotificationSinkEvent event = new NotificationSinkEvent(new ArrayList<AbstractNotification>(
- entry.getValue()));
- SafeRunner.run(new ISafeRunnable() {
- @Override
- public void handleException(Throwable e) {
- UIPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, UIPlugin.getUniqueIdentifier(), "Sink failed: " + sink.getClass(), e)); //$NON-NLS-1$
- }
- @Override
- public void run() throws Exception {
- sink.notify(event);
- }
- });
- }
+ });
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationSinkDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationSinkDescriptor.java
deleted file mode 100644
index 55de73fb2..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationSinkDescriptor.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSink;
-import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @author Steffen Pingel
- */
-public class NotificationSinkDescriptor extends NotificationElement {
-
- private NotificationSink sink;
-
- private Status status;
-
- public NotificationSinkDescriptor(IConfigurationElement element) {
- super(element);
- }
-
- public NotificationSink getSink() {
- if (sink != null || status != null) {
- return sink;
- }
-
- try {
- Object object = element.createExecutableExtension("class"); //$NON-NLS-1$
- if (object instanceof NotificationSink) {
- sink = (NotificationSink) object;
- return sink;
- }
-
- status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), NLS.bind("Sink ''{0}'' does not extend expected class for extension contributed by {1}", //$NON-NLS-1$
- object.getClass().getCanonicalName(), getPluginId()));
- }
- catch (Throwable e) {
- status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), NLS.bind("Sink failed to load for extension contributed by {0}", getPluginId()), e); //$NON-NLS-1$
- }
-
- StatusManager.getManager().handle(status);
- return null;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationsExtensionReader.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationsExtensionReader.java
deleted file mode 100644
index a5e728c4a..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/NotificationsExtensionReader.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Itema AS - bug 330064 notification filtering and model persistence
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @author Steffen Pingel
- * @author Torkild U. Resheim
- */
-public class NotificationsExtensionReader {
-
- private static boolean errorLogged = false;
-
- static List<NotificationSinkDescriptor> sinks;
-
- private static Collection<NotificationCategory> categories;
-
- /**
- * Returns a list of notification categories, each containing their belonging notification
- * events. Once initialised the same list will be returned upon subsequent calls of this method.
- *
- * @return a list of notification categories.
- * @see NotificationModel#save(org.eclipse.ui.IMemento)
- * @see NotificationModel#load(org.eclipse.ui.IMemento)
- */
- public static Collection<NotificationCategory> getCategories() {
- if (categories != null) {
- return categories;
- }
- HashMap<String, NotificationCategory> categoryById = new HashMap<String, NotificationCategory>();
-
- MultiStatus result = new MultiStatus(UIPlugin.getUniqueIdentifier(), 0, "Notifcation extensions failed to load", null); //$NON-NLS-1$
-
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(UIPlugin.getUniqueIdentifier() + ".notifications"); //$NON-NLS-1$
- IExtension[] extensions = repositoriesExtensionPoint.getExtensions();
- for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if ("category".equals(element.getName())) { //$NON-NLS-1$
- NotificationCategory category = new NotificationCategory(element);
- IStatus status = category.validate();
- if (status.isOK()) {
- categoryById.put(category.getId(), category);
- }
- else {
- result.add(status);
- }
- }
- }
- for (IConfigurationElement element : elements) {
- if ("event".equals(element.getName())) { //$NON-NLS-1$
- NotificationEvent event = new NotificationEvent(element);
- IStatus status = event.validate();
- if (status.isOK()) {
- NotificationCategory category = categoryById.get(event.getCategoryId());
- if (category != null) {
- category.addEvent(event);
- }
- else {
- result.add(new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- NLS.bind("Extension {0} contributed by {1} specify unknown category ''{2}''", new String[] { element.getNamespaceIdentifier(), element.getContributor().getName(), event.getCategoryId() }))); //NON-NLS-1$ //$NON-NLS-1$
- }
- }
- else {
- result.add(status);
- }
- }
- }
- }
-
- if (!result.isOK() && !errorLogged) {
- StatusManager.getManager().handle(result);
- errorLogged = true;
- }
-
- categories = categoryById.values();
- return categories;
- }
-
- public static List<NotificationSinkDescriptor> getSinks() {
- if (sinks != null) {
- return sinks;
- }
-
- sinks = new ArrayList<NotificationSinkDescriptor>();
-
- MultiStatus result = new MultiStatus(UIPlugin.getUniqueIdentifier(), 0, "Notifcation extensions failed to load", null); //$NON-NLS-1$
-
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint repositoriesExtensionPoint = registry.getExtensionPoint(UIPlugin.getUniqueIdentifier() + ".notifications"); //$NON-NLS-1$
- IExtension[] extensions = repositoriesExtensionPoint.getExtensions();
- for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if ("sink".equals(element.getName())) { //$NON-NLS-1$
- NotificationSinkDescriptor descriptor = new NotificationSinkDescriptor(element);
- IStatus status = descriptor.validate();
- if (status.isOK()) {
- sinks.add(descriptor);
- }
- else {
- result.add(status);
- }
- }
- }
- }
-
- if (!result.isOK()) {
- StatusManager.getManager().handle(result);
- }
-
- return sinks;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/events/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/events/EventListener.java
new file mode 100644
index 000000000..18211fb41
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/events/EventListener.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.notifications.internal.events;
+
+import java.util.EventObject;
+
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
+import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
+import org.eclipse.tcf.te.ui.notifications.internal.NotificationService;
+
+/**
+ * Event listener implementation. Handle events of type {@link NotifyEvent}.
+ */
+public class EventListener implements IEventListener {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
+ @Override
+ public void eventFired(EventObject event) {
+ if (event instanceof NotifyEvent) {
+ NotificationService.getInstance().notify((NotifyEvent)event);
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/DefaultFormTextFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/DefaultFormTextFactoryDelegate.java
new file mode 100644
index 000000000..f80c6c8b5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/DefaultFormTextFactoryDelegate.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.notifications.internal.factory;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
+import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * Default notification form text factory delegate implementation.
+ */
+public class DefaultFormTextFactoryDelegate implements IFormTextFactoryDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate#populateFormText(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.ui.forms.widgets.FormText, org.eclipse.tcf.te.runtime.events.NotifyEvent)
+ */
+ @Override
+ public void populateFormText(FormToolkit toolkit, FormText widget, NotifyEvent event) {
+ Assert.isNotNull(toolkit);
+ Assert.isNotNull(widget);
+ Assert.isNotNull(event);
+
+ // Get properties
+ String titleText = event.getProperties().getStringProperty(NotifyEvent.PROP_TITLE_TEXT);
+ String titleImageId = event.getProperties().getStringProperty(NotifyEvent.PROP_TITLE_IMAGE_ID);
+ String description = event.getProperties().getStringProperty(NotifyEvent.PROP_DESCRIPTION_TEXT);
+
+ // At least the title text and the description must be not null
+ if (titleText != null && description != null) {
+ StringBuilder buffer = new StringBuilder();
+
+ buffer.append("<form>"); //$NON-NLS-1$
+
+ // If the title image id is set, try to load the image
+ if (titleImageId != null) {
+ Image image = UIPlugin.getImage(titleImageId);
+ if (image != null) {
+ buffer.append("<img href=\"titleImage\"> "); //$NON-NLS-1$
+ widget.setImage("titleImage", image); //$NON-NLS-1$
+ }
+ }
+
+ // Set the title using the default header font
+ buffer.append("<span color=\"header\" font=\"header\">"); //$NON-NLS-1$
+ buffer.append(titleText);
+ buffer.append("</span>"); //$NON-NLS-1$
+
+ // Add the description
+ buffer.append("<p>"); //$NON-NLS-1$
+ buffer.append(description);
+ buffer.append("</p>"); //$NON-NLS-1$
+
+ buffer.append("</form>"); //$NON-NLS-1$
+
+ widget.setColor("header", toolkit.getColors().getColor(IFormColors.TITLE)); //$NON-NLS-1$
+ widget.setFont("header", JFaceResources.getHeaderFont()); //$NON-NLS-1$
+
+ widget.setText(buffer.toString(), true, false);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/FactoryDelegateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/FactoryDelegateManager.java
new file mode 100644
index 000000000..fc832f2a1
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/factory/FactoryDelegateManager.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.ui.notifications.internal.factory;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
+import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
+import org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate;
+
+
+/**
+ * Notification form text factory delegate extension point manager implementation.
+ */
+public class FactoryDelegateManager extends AbstractExtensionPointManager<IFormTextFactoryDelegate> {
+ private final IFormTextFactoryDelegate defaultDelegate = new DefaultFormTextFactoryDelegate();
+
+ /*
+ * Thread save singleton instance creation.
+ */
+ private static class LazyInstance {
+ public static FactoryDelegateManager instance = new FactoryDelegateManager();
+ }
+
+ /**
+ * Constructor.
+ */
+ FactoryDelegateManager() {
+ super();
+ }
+
+ /**
+ * Returns the singleton instance of the notification form text factory delegate manager.
+ */
+ public static FactoryDelegateManager getInstance() {
+ return LazyInstance.instance;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return "org.eclipse.tcf.te.ui.notifications.factoryDelegates"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
+ */
+ @Override
+ protected String getConfigurationElementName() {
+ return "delegate"; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the notification form text factory delegate matching the given id.
+ *
+ * @param id The notification form text factory delegate id. Must not be <code>null</code>.
+ * @return The notification form text factory delegate or <code>null</code>.
+ */
+ public IFormTextFactoryDelegate getFactoryDelegate(String id) {
+ Assert.isNotNull(id);
+
+ IFormTextFactoryDelegate delegate = null;
+
+ Collection<ExecutableExtensionProxy<IFormTextFactoryDelegate>> delegates = getExtensions().values();
+ for (ExecutableExtensionProxy<IFormTextFactoryDelegate> candidate : delegates) {
+ if (id.equals(candidate.getId())) {
+ delegate = candidate.getInstance();
+ break;
+ }
+ }
+
+ return delegate;
+ }
+
+ /**
+ * Returns the default notification form text factory delegate.
+ *
+ * @return The default notification form text factory delegate.
+ */
+ public IFormTextFactoryDelegate getDefaultFactoryDelegate() {
+ return defaultDelegate;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractNotificationPopup.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AbstractNotificationPopup.java
index a47a303f5..1c3596a64 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractNotificationPopup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AbstractNotificationPopup.java
@@ -11,7 +11,7 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications.popup;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -40,12 +40,10 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.ui.notifications.AnimationUtil;
-import org.eclipse.tcf.te.ui.notifications.AnimationUtil.FadeJob;
-import org.eclipse.tcf.te.ui.notifications.AnimationUtil.IFadeListener;
-import org.eclipse.tcf.te.ui.notifications.GradientColors;
import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
import org.eclipse.tcf.te.ui.notifications.interfaces.ImageConsts;
+import org.eclipse.tcf.te.ui.notifications.internal.popup.AnimationUtil.FadeJob;
+import org.eclipse.tcf.te.ui.notifications.internal.popup.AnimationUtil.IFadeListener;
import org.eclipse.tcf.te.ui.notifications.nls.Messages;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/AnimationUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AnimationUtil.java
index 6a3c33384..cffee0f20 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/AnimationUtil.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/AnimationUtil.java
@@ -10,7 +10,7 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/GradientColors.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/GradientColors.java
index 62105e371..a50425f87 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/GradientColors.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/GradientColors.java
@@ -11,7 +11,7 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import org.eclipse.jface.resource.DeviceResourceException;
import org.eclipse.jface.resource.ResourceManager;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/NotificationPopup.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/NotificationPopup.java
index 793f14968..3145dfc43 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/NotificationPopup.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/NotificationPopup.java
@@ -10,13 +10,12 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications.popup;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.action.LegacyActionTools;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -25,16 +24,18 @@ import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.runtime.notifications.AbstractNotification;
-import org.eclipse.tcf.te.ui.notifications.ScalingHyperlink;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
+import org.eclipse.tcf.te.ui.notifications.interfaces.IFormTextFactoryDelegate;
+import org.eclipse.tcf.te.ui.notifications.internal.factory.FactoryDelegateManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* @author Rob Elves
@@ -46,7 +47,7 @@ public class NotificationPopup extends AbstractNotificationPopup {
/* default */ Color hyperlinkWidget = null;
- private List<AbstractNotification> notifications;
+ private List<NotifyEvent> notifications;
/**
* Constructor
@@ -75,64 +76,32 @@ public class NotificationPopup extends AbstractNotificationPopup {
});
int count = 0;
- for (final AbstractNotification notification : notifications) {
+ for (final NotifyEvent notification : notifications) {
Composite notificationComposite = new Composite(parent, SWT.NO_FOCUS);
- GridLayout gridLayout = new GridLayout(2, false);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).applyTo(notificationComposite);
+ GridLayout gridLayout = new GridLayout(1, false);
+ GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(notificationComposite);
notificationComposite.setLayout(gridLayout);
notificationComposite.setBackground(parent.getBackground());
if (count < NUM_NOTIFICATIONS_TO_DISPLAY) {
- final Label notificationLabelIcon = new Label(notificationComposite, SWT.NO_FOCUS);
- notificationLabelIcon.setBackground(parent.getBackground());
- if (notification instanceof AbstractUiNotification) {
- notificationLabelIcon.setImage(((AbstractUiNotification) notification).getNotificationKindImage());
+ // Get the notification form text factory delegate for the current notification
+ IFormTextFactoryDelegate delegate = null;
+ if (notification.getFactoryId() != null) {
+ delegate = FactoryDelegateManager.getInstance().getFactoryDelegate(notification.getFactoryId());
}
+ if (delegate == null) delegate = FactoryDelegateManager.getInstance().getDefaultFactoryDelegate();
+ Assert.isNotNull(delegate);
- final ScalingHyperlink itemLink = new ScalingHyperlink(notificationComposite, SWT.BEGINNING | SWT.NO_FOCUS);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).applyTo(itemLink);
- itemLink.setForeground(hyperlinkWidget);
- itemLink.registerMouseTrackListener();
- itemLink.setText(LegacyActionTools.escapeMnemonics(notification.getLabel()));
- if (notification instanceof AbstractUiNotification) {
- itemLink.setImage(((AbstractUiNotification) notification).getNotificationImage());
- }
- itemLink.setBackground(parent.getBackground());
- itemLink.addHyperlinkListener(new HyperlinkAdapter() {
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (notification instanceof AbstractUiNotification) {
- ((AbstractUiNotification) notification).open();
- }
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- Shell windowShell = window.getShell();
- if (windowShell != null) {
- if (windowShell.getMinimized()) {
- windowShell.setMinimized(false);
- }
+ // Get the form toolkit to use
+ FormToolkit toolkit = UIPlugin.getDefault().getFormToolkit();
+ Assert.isNotNull(toolkit);
- windowShell.open();
- windowShell.forceActive();
- }
- }
- }
- });
+ // Create the form text widget.
+ FormText widget = toolkit.createFormText(notificationComposite, true);
+ widget.setBackground(parent.getBackground());
- String descriptionText = null;
- if (notification.getDescription() != null) {
- descriptionText = notification.getDescription();
- }
- if (descriptionText != null && !descriptionText.trim().equals("")) { //$NON-NLS-1$
- Label descriptionLabel = new Label(notificationComposite, SWT.NO_FOCUS);
- descriptionLabel.setText(LegacyActionTools.escapeMnemonics(descriptionText));
- descriptionLabel.setBackground(parent.getBackground());
- GridDataFactory.fillDefaults()
- .span(2, SWT.DEFAULT)
- .grab(true, false)
- .align(SWT.FILL, SWT.TOP)
- .applyTo(descriptionLabel);
- }
+ // Populate the widget content based on the current notification event
+ delegate.populateFormText(toolkit, widget, notification);
} else {
int numNotificationsRemain = notifications.size() - count;
ScalingHyperlink remainingLink = new ScalingHyperlink(notificationComposite, SWT.NO_FOCUS);
@@ -141,7 +110,6 @@ public class NotificationPopup extends AbstractNotificationPopup {
remainingLink.setBackground(parent.getBackground());
remainingLink.setText(NLS.bind("{0} more", Integer.valueOf(numNotificationsRemain))); //$NON-NLS-1$
- GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(remainingLink);
remainingLink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -161,8 +129,8 @@ public class NotificationPopup extends AbstractNotificationPopup {
}
}
- public List<AbstractNotification> getNotifications() {
- return new ArrayList<AbstractNotification>(notifications);
+ public List<NotifyEvent> getNotifications() {
+ return new ArrayList<NotifyEvent>(notifications);
}
/* (non-Javadoc)
@@ -170,10 +138,16 @@ public class NotificationPopup extends AbstractNotificationPopup {
*/
@Override
protected Color getTitleForeground() {
- return UIPlugin.getDefault().getFormColors().getColor(IFormColors.TITLE);
+ return UIPlugin.getDefault().getFormToolkit().getColors().getColor(IFormColors.TITLE);
}
- public void setContents(List<AbstractNotification> notifications) {
+ /**
+ * Sets the content of the notify popup.
+ *
+ * @param notifications The notification events. Must not be <code>null</code>.
+ */
+ public void setContents(List<NotifyEvent> notifications) {
+ Assert.isNotNull(notifications);
this.notifications = notifications;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/sink/PopupNotificationSink.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/PopupNotificationSink.java
index dc7c0675f..20357aa25 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/sink/PopupNotificationSink.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/PopupNotificationSink.java
@@ -10,16 +10,17 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications.popup.sink;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import java.util.WeakHashMap;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
@@ -28,11 +29,8 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.runtime.notifications.AbstractNotification;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSink;
-import org.eclipse.tcf.te.runtime.notifications.NotificationSinkEvent;
+import org.eclipse.tcf.te.runtime.events.NotifyEvent;
import org.eclipse.tcf.te.ui.notifications.nls.Messages;
-import org.eclipse.tcf.te.ui.notifications.popup.NotificationPopup;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.PlatformUI;
@@ -40,7 +38,7 @@ import org.eclipse.ui.PlatformUI;
* @author Rob Elves
* @author Steffen Pingel
*/
-public class PopupNotificationSink extends NotificationSink {
+public class PopupNotificationSink {
private static final long DELAY_OPEN = 1 * 1000;
@@ -48,11 +46,11 @@ public class PopupNotificationSink extends NotificationSink {
/* default */ NotificationPopup popup;
- /* default */ final WeakHashMap<Object, Object> cancelledTokens = new WeakHashMap<Object, Object>();
+ /* default */ final List<NotifyEvent> cancelledNotifications = new ArrayList<NotifyEvent>();
- private final Set<AbstractNotification> notifications = new HashSet<AbstractNotification>();
+ private final Set<NotifyEvent> notifications = new HashSet<NotifyEvent>();
- /* default */ final Set<AbstractNotification> currentlyNotifying = Collections.synchronizedSet(notifications);
+ /* default */ final Set<NotifyEvent> currentlyNotifying = Collections.synchronizedSet(notifications);
private final Job openJob = new Job(Messages.PopupNotificationSink_Popup_Notifier_Job_Label) {
@Override
@@ -65,21 +63,18 @@ public class PopupNotificationSink extends NotificationSink {
@Override
public void run() {
- collectNotifications();
-
if (popup != null && popup.getReturnCode() == Window.CANCEL) {
- List<AbstractNotification> notifications = popup.getNotifications();
- for (AbstractNotification notification : notifications) {
- if (notification.getToken() != null) {
- cancelledTokens.put(notification.getToken(), null);
+ List<NotifyEvent> notifications = popup.getNotifications();
+ for (NotifyEvent notification : notifications) {
+ if (!cancelledNotifications.contains(notification)) {
+ cancelledNotifications.add(notification);
}
}
}
- for (Iterator<AbstractNotification> it = currentlyNotifying.iterator(); it.hasNext();) {
- AbstractNotification notification = it.next();
- if (notification.getToken() != null
- && cancelledTokens.containsKey(notification.getToken())) {
+ for (Iterator<NotifyEvent> it = currentlyNotifying.iterator(); it.hasNext();) {
+ NotifyEvent notification = it.next();
+ if (cancelledNotifications.contains(notification)) {
it.remove();
}
}
@@ -116,27 +111,21 @@ public class PopupNotificationSink extends NotificationSink {
currentlyNotifying.clear();
}
- /** public for testing */
- public void collectNotifications() {
- }
-
- /**
- * public for testing purposes
- */
- public Set<AbstractNotification> getNotifications() {
- synchronized (PopupNotificationSink.class) {
- return currentlyNotifying;
- }
- }
public boolean isAnimationsEnabled() {
IPreferenceStore store = PlatformUI.getPreferenceStore();
return store.getBoolean(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS);
}
- @Override
- public void notify(NotificationSinkEvent event) {
- currentlyNotifying.addAll(event.getNotifications());
+ /**
+ * Notify the given notification events.
+ *
+ * @param events The notification events. Must not be <code>null</code>.
+ */
+ public void notify(NotifyEvent[] events) {
+ Assert.isNotNull(events);
+
+ currentlyNotifying.addAll(Arrays.asList(events));
if (!openJob.cancel()) {
try {
@@ -156,7 +145,7 @@ public class PopupNotificationSink extends NotificationSink {
Shell shell = new Shell(PlatformUI.getWorkbench().getDisplay());
popup = new NotificationPopup(shell);
popup.setFadingEnabled(isAnimationsEnabled());
- List<AbstractNotification> toDisplay = new ArrayList<AbstractNotification>(currentlyNotifying);
+ List<NotifyEvent> toDisplay = new ArrayList<NotifyEvent>(currentlyNotifying);
Collections.sort(toDisplay);
popup.setContents(toDisplay);
cleanNotified();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/ScalingHyperlink.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/ScalingHyperlink.java
index 6b685b104..ab2132c30 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/ScalingHyperlink.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/internal/popup/ScalingHyperlink.java
@@ -10,7 +10,7 @@
* Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
*******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications;
+package org.eclipse.tcf.te.ui.notifications.internal.popup;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractUiNotification.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractUiNotification.java
deleted file mode 100644
index 710a4fd36..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/popup/AbstractUiNotification.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Tasktop Technologies and others.
- * 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:
- * Tasktop Technologies - initial API and implementation
- * Wind River Systems - Extracted from o.e.mylyn.commons and adapted for Target Explorer
- *******************************************************************************/
-
-package org.eclipse.tcf.te.ui.notifications.popup;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.runtime.notifications.AbstractNotification;
-
-/**
- * A notification with UI specific extensions.
- *
- * @author Steffen Pingel
- */
-public abstract class AbstractUiNotification extends AbstractNotification {
-
- public AbstractUiNotification(String eventId) {
- super(eventId);
- }
-
- public abstract Image getNotificationImage();
-
- public abstract Image getNotificationKindImage();
-
- /**
- * Executes the default action for opening the notification.
- */
- public abstract void open();
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/IPreferenceKeys.java
deleted file mode 100644
index 82008acb7..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/IPreferenceKeys.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications.preferences;
-
-import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-
-
-/**
- * Preference key identifiers.
- */
-public interface IPreferenceKeys {
- /**
- * Common prefix for all core preference keys
- */
- public final String PREFIX = UIPlugin.getUniqueIdentifier();
-
- /**
- * If set to <code>true</code>, the notifications service is enabled.
- */
- public static final String PREF_SERVICE_ENABLED = PREFIX + ".service.enabled"; //$NON-NLS-1$
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/PreferencesInitializer.java
deleted file mode 100644
index 718bd9220..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.notifications/src/org/eclipse/tcf/te/ui/notifications/preferences/PreferencesInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. 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:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.ui.notifications.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tcf.te.ui.notifications.activator.UIPlugin;
-
-/**
- * Preferences initializer implementation.
- */
-public class PreferencesInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- @Override
- public void initializeDefaultPreferences() {
- // Get the preferences store
- IPreferenceStore store = UIPlugin.getDefault().getPreferenceStore();
- // [Hidden] Enable notifications service: default on
- store.setDefault(IPreferenceKeys.PREF_SERVICE_ENABLED, true);
- }
-
-}

Back to the top