Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.explorer')
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.jdt.ui.prefs2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/about.ini15
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/about.mappings6
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/about.properties31
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/modeling32.pngbin2414 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/plugin.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/plugin.xml4
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/pom.xml4
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/explorer/CDOExplorerElement.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractManager.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java6
15 files changed, 90 insertions, 81 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.core.resources.prefs
index 4f61cd36ae..99f26c0203 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,2 @@
-#Mon Jul 04 13:02:52 CEST 2011
eclipse.preferences.version=1
-
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.jdt.ui.prefs
index c993e80543..79e0b974b9 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.cdo.explorer/.settings/org.eclipse.jdt.ui.prefs
@@ -75,7 +75,7 @@ org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2021 Eike Stepper (Loehne, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2023 Eike Stepper (Loehne, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
diff --git a/plugins/org.eclipse.emf.cdo.explorer/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.explorer/META-INF/MANIFEST.MF
index 2408e70e95..4d33a458e3 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.explorer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.explorer;singleton:=true
-Bundle-Version: 4.11.0.qualifier
+Bundle-Version: 4.12.0.qualifier
Bundle-Activator: org.eclipse.emf.cdo.internal.explorer.bundle.OM$Activator
Bundle-Vendor: %providerName
Bundle-ClassPath: .
@@ -27,13 +27,13 @@ Import-Package: org.h2;version="[1.0.0,2.0.0)";resolution:=optional,
org.h2.jdbcx;version="[1.0.0,2.0.0)";resolution:=optional,
org.h2.util;version="[1.0.0,2.0.0)";resolution:=optional,
org.h2.value;version="[1.0.0,2.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.explorer;version="4.11.0",
- org.eclipse.emf.cdo.explorer.checkouts;version="4.11.0",
- org.eclipse.emf.cdo.explorer.repositories;version="4.11.0",
- org.eclipse.emf.cdo.internal.explorer;version="4.11.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.cdo.internal.explorer.bundle;version="4.11.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.explorer.checkouts;version="4.11.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.cdo.internal.explorer.repositories;version="4.11.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.cdo.internal.explorer.resources;version="4.11.0";x-friends:="org.eclipse.emf.cdo.explorer.ui"
+Export-Package: org.eclipse.emf.cdo.explorer;version="4.12.0",
+ org.eclipse.emf.cdo.explorer.checkouts;version="4.12.0",
+ org.eclipse.emf.cdo.explorer.repositories;version="4.12.0",
+ org.eclipse.emf.cdo.internal.explorer;version="4.12.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
+ org.eclipse.emf.cdo.internal.explorer.bundle;version="4.12.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.explorer.checkouts;version="4.12.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
+ org.eclipse.emf.cdo.internal.explorer.repositories;version="4.12.0";x-friends:="org.eclipse.emf.cdo.explorer.ui",
+ org.eclipse.emf.cdo.internal.explorer.resources;version="4.12.0";x-friends:="org.eclipse.emf.cdo.explorer.ui"
Eclipse-BuddyPolicy: registered
Automatic-Module-Name: org.eclipse.emf.cdo.explorer
diff --git a/plugins/org.eclipse.emf.cdo.explorer/about.ini b/plugins/org.eclipse.emf.cdo.explorer/about.ini
deleted file mode 100644
index 32006ae5d6..0000000000
--- a/plugins/org.eclipse.emf.cdo.explorer/about.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%featureText
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=modeling32.png
-
-# Property "appName" contains name of the application (translated)
-appName=%featureName
-
diff --git a/plugins/org.eclipse.emf.cdo.explorer/about.mappings b/plugins/org.eclipse.emf.cdo.explorer/about.mappings
deleted file mode 100644
index 28e3764743..0000000000
--- a/plugins/org.eclipse.emf.cdo.explorer/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=${build.qualifier} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.explorer/about.properties b/plugins/org.eclipse.emf.cdo.explorer/about.properties
deleted file mode 100644
index 0e634541b0..0000000000
--- a/plugins/org.eclipse.emf.cdo.explorer/about.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2015 Eike Stepper (Loehne, Germany) 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:
-# Eike Stepper - initial API and implementation
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-featureName = CDO Model Repository Explorer
-featureText = CDO Model Repository Explorer\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-Copyright (c) 2004-2021 Eike Stepper (Loehne, Germany) and others. All rights reserved.\n\
-\n\
-Visit http://www.eclipse.org/cdo
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
diff --git a/plugins/org.eclipse.emf.cdo.explorer/modeling32.png b/plugins/org.eclipse.emf.cdo.explorer/modeling32.png
deleted file mode 100644
index 6b08de2ada..0000000000
--- a/plugins/org.eclipse.emf.cdo.explorer/modeling32.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.cdo.explorer/plugin.properties b/plugins/org.eclipse.emf.cdo.explorer/plugin.properties
index 5f40b26a18..c675964ee6 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.explorer/plugin.properties
@@ -1,4 +1,4 @@
-# Copyright (c) 2011-2013 Eike Stepper (Loehne, Germany) and others.
+# Copyright (c) 2011-2013, 2022 Eike Stepper (Loehne, Germany) 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
@@ -16,3 +16,5 @@ product.description = The CDO explorer application
product.name = CDO Explorer
perspective.name = CDO Explorer
+
+refreshProvider.name = CDO Auto-refresh monitor
diff --git a/plugins/org.eclipse.emf.cdo.explorer/plugin.xml b/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
index 22a84a6a92..758b686b95 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
- Copyright (c) 2011-2013, 2015, 2021 Eike Stepper (Loehne, Germany) and others.
+ Copyright (c) 2011-2013, 2015, 2021, 2022 Eike Stepper (Loehne, Germany) 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
@@ -86,7 +86,7 @@
<extension point="org.eclipse.core.resources.refreshProviders">
<refreshProvider
class="org.eclipse.emf.cdo.internal.explorer.resources.CDOCheckoutRefreshProvider"
- name="CDO Auto-refresh monitor"/>
+ name="%refreshProvider.name"/>
</extension>
</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.explorer/pom.xml b/plugins/org.eclipse.emf.cdo.explorer/pom.xml
index 9833f36546..cc0fcd2a17 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017-2021 Eike Stepper (Loehne, Germany) and others.
+ Copyright (c) 2017-2022 Eike Stepper (Loehne, Germany) 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
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.emf.cdo.explorer</artifactId>
- <version>4.11.0-SNAPSHOT</version>
+ <version>4.12.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/explorer/CDOExplorerElement.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/explorer/CDOExplorerElement.java
index 4930c4374d..555e532e02 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/explorer/CDOExplorerElement.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/explorer/CDOExplorerElement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020, 2021 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2020-2022 Eike Stepper (Loehne, Germany) 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
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.explorer;
+import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.emf.common.notify.Adapter;
@@ -67,4 +68,16 @@ public interface CDOExplorerElement extends INotifier, IAdaptable, Adapter, Comp
public Properties getProperties();
public void delete(boolean deleteContents);
+
+ /**
+ * @author Eike Stepper
+ * @since 4.12
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+ public interface StateChangedEvent extends IEvent
+ {
+ @Override
+ public CDOExplorerElement getSource();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
index ec048b0a98..73b1415e2b 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractElement.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019-2021 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2019-2022 Eike Stepper (Loehne, Germany) 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
@@ -20,6 +20,8 @@ import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.container.IManagedContainerProvider;
import org.eclipse.net4j.util.container.IPluginContainer;
+import org.eclipse.net4j.util.event.Event;
+import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.event.Notifier;
import org.eclipse.net4j.util.io.IOUtil;
@@ -167,6 +169,15 @@ public abstract class AbstractElement extends Notifier implements CDOExplorerEle
}
}
+ protected final void fireStateChangedEvent()
+ {
+ IListener[] listeners = getListeners();
+ if (listeners.length != 0)
+ {
+ fireEvent(new StateChangedEventImpl(this), listeners);
+ }
+ }
+
public String validateLabel(String label)
{
if (StringUtil.isEmpty(label.trim()))
@@ -383,4 +394,23 @@ public abstract class AbstractElement extends Notifier implements CDOExplorerEle
return result.toArray(new AbstractElement[result.size()]);
}
+
+ /**
+ * @author Eike Stepper
+ */
+ private static final class StateChangedEventImpl extends Event implements StateChangedEvent
+ {
+ private static final long serialVersionUID = 1L;
+
+ public StateChangedEventImpl(AbstractElement element)
+ {
+ super(element);
+ }
+
+ @Override
+ public AbstractElement getSource()
+ {
+ return (AbstractElement)super.getSource();
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractManager.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractManager.java
index bae7612b9d..4bc96329b2 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractManager.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/AbstractManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 2019, 2020 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019, 2020, 2022 Eike Stepper (Loehne, Germany) 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
@@ -150,8 +150,7 @@ public abstract class AbstractManager<T extends CDOExplorerElement> extends SetC
continue;
}
- T element = addElement(child, properties);
- ((AbstractElement)element).save();
+ T element = addElement(child, properties, true);
return element;
}
}
@@ -161,18 +160,23 @@ public abstract class AbstractManager<T extends CDOExplorerElement> extends SetC
Properties properties = loadProperties(folder, getPropertiesFileName());
if (properties != null)
{
- addElement(folder, properties);
+ addElement(folder, properties, false);
}
}
- private T addElement(File folder, Properties properties)
+ private T addElement(File folder, Properties properties, boolean newElement)
{
String type = properties.getProperty("type");
T element = createElement(type);
((AbstractElement)element).init(folder, type, properties);
- LifecycleUtil.activate(element);
+ if (newElement)
+ {
+ ((AbstractElement)element).save();
+ }
+
+ LifecycleUtil.activate(element);
addElement(element);
elementMap.put(element.getID(), element);
return element;
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
index 94ca561044..20d53dc1fd 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/checkouts/CDOCheckoutImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 2019-2021 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019-2022 Eike Stepper (Loehne, Germany) 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
@@ -599,6 +599,8 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
try
{
state = State.Opening;
+ fireStateChangedEvent();
+
if (manager != null)
{
manager.fireCheckoutOpenEvent(this, null, oldState, state);
@@ -677,9 +679,14 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
}
finally
{
- if (manager != null && oldState != null && newState != null && newState != oldState)
+ if (oldState != null && newState != null && newState != oldState)
{
- manager.fireCheckoutOpenEvent(this, view, oldState, newState);
+ fireStateChangedEvent();
+
+ if (manager != null)
+ {
+ manager.fireCheckoutOpenEvent(this, view, oldState, newState);
+ }
}
}
}
@@ -735,6 +742,8 @@ public abstract class CDOCheckoutImpl extends AbstractElement implements CDOChec
if (closed)
{
+ fireStateChangedEvent();
+
CDOCheckoutManagerImpl manager = getManager();
if (manager != null)
{
diff --git a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
index 7aff975d16..53324041fb 100644
--- a/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.explorer/src/org/eclipse/emf/cdo/internal/explorer/repositories/CDORepositoryImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, 2019-2021 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019-2022 Eike Stepper (Loehne, Germany) 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
@@ -350,6 +350,8 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
if (connected)
{
+ fireStateChangedEvent();
+
CDORepositoryManagerImpl manager = getManager();
if (manager != null)
{
@@ -407,6 +409,8 @@ public abstract class CDORepositoryImpl extends AbstractElement implements CDORe
if (disconnected)
{
+ fireStateChangedEvent();
+
CDORepositoryManagerImpl manager = getManager();
if (manager != null)
{

Back to the top