1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 10:05:24 +02:00
move CURRENT_RELEASE and CURRENT_RELEASE_NAME from SystemResources to RSECorePlugin. These aren't resources and should be in core. Needed prior to moving filters.

Reference the core persistence manager accessor in the filter code instead of the ui persistence manager accessor. Its the same persistence manager.
This commit is contained in:
David Dykstal 2007-03-29 02:59:34 +00:00
parent 4c6f499e88
commit 1f20507aa2
10 changed files with 28 additions and 29 deletions

View file

@ -34,6 +34,16 @@ import org.osgi.framework.BundleContext;
*/ */
public class RSECorePlugin extends Plugin { public class RSECorePlugin extends Plugin {
/**
* Current release as a number (multiplied by 10). E.g. 30 is for release 3.0.
*/
public static final int CURRENT_RELEASE = 100; // updated to new release
/**
* Current release as a string.
*/
public static final String CURRENT_RELEASE_NAME = "1.0.0"; //$NON-NLS-1$
private static RSECorePlugin plugin = null; // the singleton instance of this plugin private static RSECorePlugin plugin = null; // the singleton instance of this plugin
private Logger logger = null; private Logger logger = null;
private ISystemRegistry _registry = null; private ISystemRegistry _registry = null;

View file

@ -75,7 +75,6 @@ import org.eclipse.rse.ui.ISystemPreferencesConstants;
import org.eclipse.rse.ui.RSESystemTypeAdapter; import org.eclipse.rse.ui.RSESystemTypeAdapter;
import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemPreferencesManager; import org.eclipse.rse.ui.SystemPreferencesManager;
import org.eclipse.rse.ui.SystemResources;
import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction; import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction; import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
@ -972,7 +971,7 @@ public class SystemViewPart
} }
// We record the current release for future in case anything significant changes from release to release // We record the current release for future in case anything significant changes from release to release
memento.putString(TAG_RELEASE, SystemResources.CURRENT_RELEASE_NAME); memento.putString(TAG_RELEASE, RSECorePlugin.CURRENT_RELEASE_NAME);
// We record the current preferences for show filter string and show filter pools. // We record the current preferences for show filter string and show filter pools.
// We do this to ensure the states match on restore. If they don't we will be in trouble // We do this to ensure the states match on restore. If they don't we will be in trouble

View file

@ -53,6 +53,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.SameShellProvider; import org.eclipse.jface.window.SameShellProvider;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemAdapterHelpers;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.core.SystemResourceManager;
@ -1134,7 +1135,7 @@ public class SystemTeamViewPart
} }
// We record the current release for future in case anything significant changes from release to release // We record the current release for future in case anything significant changes from release to release
memento.putString(TAG_RELEASE, SystemResources.CURRENT_RELEASE_NAME); memento.putString(TAG_RELEASE, RSECorePlugin.CURRENT_RELEASE_NAME);
/* /*
String inputMemento = memento.getString("factoryID"); // see IWorkbenchWindow ... this is only clue I can figure out! String inputMemento = memento.getString("factoryID"); // see IWorkbenchWindow ... this is only clue I can figure out!

View file

@ -26,17 +26,6 @@ public class SystemResources extends NLS
{ {
private static String BUNDLE_NAME = "org.eclipse.rse.ui.SystemResources";//$NON-NLS-1$ private static String BUNDLE_NAME = "org.eclipse.rse.ui.SystemResources";//$NON-NLS-1$
/**
* Current release as a number (multiplied by 10). E.g. 30 is for release 3.0.
*/
public static final int CURRENT_RELEASE = 100; // updated to new release
/**
* Current release as a string.
*/
public static final String CURRENT_RELEASE_NAME = "1.0.0"; //$NON-NLS-1$
// Buttons // Buttons
// *** NOT GOOD TO USE BUTTONS. BETTER TO USE ACTIONS WITH THEIR // *** NOT GOOD TO USE BUTTONS. BETTER TO USE ACTIONS WITH THEIR
// .label,.tooltip and .description ASSOCIATIONS // .label,.tooltip and .description ASSOCIATIONS

View file

@ -23,6 +23,7 @@ import java.util.Vector;
import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
import org.eclipse.rse.core.filters.ISystemFilter; import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterConstants; import org.eclipse.rse.core.filters.ISystemFilterConstants;
@ -35,7 +36,6 @@ import org.eclipse.rse.core.model.RSEModelResources;
import org.eclipse.rse.core.references.IRSEReferencedObject; import org.eclipse.rse.core.references.IRSEReferencedObject;
import org.eclipse.rse.filters.SystemFilterSimple; import org.eclipse.rse.filters.SystemFilterSimple;
import org.eclipse.rse.internal.references.SystemReferencedObject; import org.eclipse.rse.internal.references.SystemReferencedObject;
import org.eclipse.rse.ui.RSEUIPlugin;
/** /**
@ -1365,7 +1365,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
public boolean commit() public boolean commit()
{ {
return RSEUIPlugin.getThePersistenceManager().commit(this); return RSECorePlugin.getThePersistenceManager().commit(this);
} }
} }

View file

@ -18,10 +18,10 @@ package org.eclipse.rse.internal.filters;
import java.util.Iterator; import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.filters.ISystemFilter; import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool; import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.ui.SystemResources;
/** /**
@ -134,7 +134,7 @@ public class SystemFilterContainerCommonMethods
{ {
newFilter = new SystemFilter(); newFilter = new SystemFilter();
// FIXME getMOFfactory().createSystemFilter(); // FIXME getMOFfactory().createSystemFilter();
newFilter.setRelease(SystemResources.CURRENT_RELEASE); newFilter.setRelease(RSECorePlugin.CURRENT_RELEASE);
newFilter.setName(aliasName); newFilter.setName(aliasName);
newFilter.setParentFilterPool(parentPool); newFilter.setParentFilterPool(parentPool);
if (filterStrings != null) if (filterStrings != null)

View file

@ -22,6 +22,7 @@ import java.util.Vector;
import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemResourceHelpers; import org.eclipse.rse.core.SystemResourceHelpers;
import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy; import org.eclipse.rse.core.filters.IRSEFilterNamingPolicy;
import org.eclipse.rse.core.filters.ISystemFilter; import org.eclipse.rse.core.filters.ISystemFilter;
@ -34,8 +35,6 @@ import org.eclipse.rse.core.filters.ISystemFilterSavePolicies;
import org.eclipse.rse.core.filters.SystemFilterNamingPolicy; import org.eclipse.rse.core.filters.SystemFilterNamingPolicy;
import org.eclipse.rse.core.model.RSEModelResources; import org.eclipse.rse.core.model.RSEModelResources;
import org.eclipse.rse.internal.references.SystemPersistableReferencedObject; import org.eclipse.rse.internal.references.SystemPersistableReferencedObject;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemResources;
/** /**
@ -306,7 +305,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
{ {
try try
{ {
pool = (SystemFilterPool)RSEUIPlugin.getThePersistenceManager().restoreFilterPool(name); pool = (SystemFilterPool)RSECorePlugin.getThePersistenceManager().restoreFilterPool(name);
} }
catch (Exception exc) // real error trying to restore, versus simply not found. catch (Exception exc) // real error trying to restore, versus simply not found.
{ {
@ -336,7 +335,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
{ {
ISystemFilterPool pool = new SystemFilterPool(); ISystemFilterPool pool = new SystemFilterPool();
// FIXME SystemFilterImpl.initMOF().createSystemFilterPool(); // FIXME SystemFilterImpl.initMOF().createSystemFilterPool();
pool.setRelease(SystemResources.CURRENT_RELEASE); pool.setRelease(RSECorePlugin.CURRENT_RELEASE);
return (SystemFilterPool)pool; return (SystemFilterPool)pool;
} }
@ -1322,7 +1321,7 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
public boolean commit() public boolean commit()
{ {
return RSEUIPlugin.getThePersistenceManager().commit(this); return RSECorePlugin.getThePersistenceManager().commit(this);
} }
} }

View file

@ -18,6 +18,7 @@ package org.eclipse.rse.internal.filters;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.filters.ISystemFilter; import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterConstants; import org.eclipse.rse.core.filters.ISystemFilterConstants;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
@ -27,7 +28,6 @@ import org.eclipse.rse.core.model.RSEModelObject;
import org.eclipse.rse.core.model.RSEModelResources; import org.eclipse.rse.core.model.RSEModelResources;
import org.eclipse.rse.core.references.IRSEBaseReferencingObject; import org.eclipse.rse.core.references.IRSEBaseReferencingObject;
import org.eclipse.rse.internal.references.SystemReferencedObjectHelper; import org.eclipse.rse.internal.references.SystemReferencedObjectHelper;
import org.eclipse.rse.ui.RSEUIPlugin;
/** /**
@ -290,7 +290,7 @@ public class SystemFilterString extends RSEModelObject implements ISystemFilterS
public boolean commit() public boolean commit()
{ {
return RSEUIPlugin.getThePersistenceManager().commit(getParentSystemFilter()); return RSECorePlugin.getThePersistenceManager().commit(getParentSystemFilter());
} }
} }

View file

@ -1,6 +1,6 @@
package org.eclipse.rse.useractions.ui.compile; package org.eclipse.rse.useractions.ui.compile;
import org.eclipse.rse.ui.SystemResources; import org.eclipse.rse.core.RSECorePlugin;
/** /**
* Constants used in the persistence of the compile commands, into an xml file * Constants used in the persistence of the compile commands, into an xml file
@ -23,7 +23,7 @@ public interface ISystemCompileXMLConstants {
/** /**
* Current version number for the compile framework * Current version number for the compile framework
*/ */
public static final String VERSION_VALUE = SystemResources.CURRENT_RELEASE_NAME; // changed from "5.1.0" by Phil public static final String VERSION_VALUE = RSECorePlugin.CURRENT_RELEASE_NAME; // changed from "5.1.0" by Phil
/** /**
* The name of the copyright element (tag) holding the copyright value. That element is named "copyright". * The name of the copyright element (tag) holding the copyright value. That element is named "copyright".
*/ */

View file

@ -40,6 +40,7 @@ import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.SystemResourceHelpers; import org.eclipse.rse.core.SystemResourceHelpers;
import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.core.SystemResourceManager;
@ -111,7 +112,7 @@ public abstract class SystemUDBaseManager implements ErrorHandler, IResourceChan
/** /**
* Current release as a string. Eg "5.0" * Current release as a string. Eg "5.0"
*/ */
private static final String CURRENT_RELEASE_NAME = SystemResources.CURRENT_RELEASE_NAME; //"5.1.2"; // Historical from when part of iSeries. private static final String CURRENT_RELEASE_NAME = RSECorePlugin.CURRENT_RELEASE_NAME; //"5.1.2"; // Historical from when part of iSeries.
/** /**
* Constructor * Constructor
@ -631,7 +632,7 @@ public abstract class SystemUDBaseManager implements ErrorHandler, IResourceChan
if (!docRelease.equals(CURRENT_RELEASE_NAME)) { if (!docRelease.equals(CURRENT_RELEASE_NAME)) {
//System.out.println("Doing migration from "+docRelease+" to " + ISystemConstants.CURRENT_RELEASE_NAME + "..."); //System.out.println("Doing migration from "+docRelease+" to " + ISystemConstants.CURRENT_RELEASE_NAME + "...");
boolean migrationDone = doMigration(profile, docRelease); boolean migrationDone = doMigration(profile, docRelease);
docroot.setAttribute(RELEASE_ATTR, SystemResources.CURRENT_RELEASE_NAME); docroot.setAttribute(RELEASE_ATTR, RSECorePlugin.CURRENT_RELEASE_NAME);
if (migrationDone) { if (migrationDone) {
setChanged(profile); // is this the right thing to do? setChanged(profile); // is this the right thing to do?
saveUserData(profile); saveUserData(profile);