mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 18:35:32 +02:00
[183165] Do not implement constant interfaces
This commit is contained in:
parent
e8dc372b54
commit
fe8cc2c5f0
4 changed files with 47 additions and 50 deletions
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.model;
|
package org.eclipse.rse.core.model;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,18 +11,13 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.dstore.universal.miners;
|
package org.eclipse.rse.dstore.universal.miners;
|
||||||
|
|
||||||
import org.eclipse.rse.services.clientserver.IServiceConstants;
|
public interface IUniversalDataStoreConstants
|
||||||
|
|
||||||
public interface IUniversalDataStoreConstants extends IServiceConstants
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Miner names, used for logging
|
* Miner names, used for logging
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
|
* Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.widgets;
|
package org.eclipse.rse.ui.widgets;
|
||||||
|
@ -58,8 +58,7 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
* <li>{@link #resetPressed()} -> when user successfully presses reset
|
* <li>{@link #resetPressed()} -> when user successfully presses reset
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
public class SystemEditPaneStateMachine
|
||||||
//, SelectionListener
|
|
||||||
{
|
{
|
||||||
// state
|
// state
|
||||||
private Composite composite;
|
private Composite composite;
|
||||||
|
@ -131,9 +130,9 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void setNewMode()
|
public void setNewMode()
|
||||||
{
|
{
|
||||||
setButtonText(mode, MODE_NEW);
|
setButtonText(mode, ISystemEditPaneStates.MODE_NEW);
|
||||||
setMode(MODE_NEW);
|
setMode(ISystemEditPaneStates.MODE_NEW);
|
||||||
setState(STATE_INITIAL);
|
setState(ISystemEditPaneStates.STATE_INITIAL);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
if (!composite.isVisible())
|
if (!composite.isVisible())
|
||||||
composite.setVisible(true);
|
composite.setVisible(true);
|
||||||
|
@ -144,9 +143,9 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void setEditMode()
|
public void setEditMode()
|
||||||
{
|
{
|
||||||
setButtonText(mode, MODE_EDIT);
|
setButtonText(mode, ISystemEditPaneStates.MODE_EDIT);
|
||||||
setMode(MODE_EDIT);
|
setMode(ISystemEditPaneStates.MODE_EDIT);
|
||||||
setState(STATE_INITIAL);
|
setState(ISystemEditPaneStates.STATE_INITIAL);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
if (!composite.isVisible())
|
if (!composite.isVisible())
|
||||||
composite.setVisible(true);
|
composite.setVisible(true);
|
||||||
|
@ -157,9 +156,9 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void setUnsetMode()
|
public void setUnsetMode()
|
||||||
{
|
{
|
||||||
setButtonText(mode, MODE_UNSET);
|
setButtonText(mode, ISystemEditPaneStates.MODE_UNSET);
|
||||||
setMode(MODE_UNSET);
|
setMode(ISystemEditPaneStates.MODE_UNSET);
|
||||||
setState(STATE_INITIAL);
|
setState(ISystemEditPaneStates.STATE_INITIAL);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
if (composite.isVisible())
|
if (composite.isVisible())
|
||||||
composite.setVisible(false);
|
composite.setVisible(false);
|
||||||
|
@ -170,7 +169,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void setChangesMade()
|
public void setChangesMade()
|
||||||
{
|
{
|
||||||
setState(STATE_PENDING);
|
setState(ISystemEditPaneStates.STATE_PENDING);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -193,7 +192,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
} catch (Exception exc) {}
|
} catch (Exception exc) {}
|
||||||
}
|
}
|
||||||
//if (!changesPending) // user has made decision, so clear state
|
//if (!changesPending) // user has made decision, so clear state
|
||||||
setState(STATE_INITIAL); // one way or another, decision has been made
|
setState(ISystemEditPaneStates.STATE_INITIAL); // one way or another, decision has been made
|
||||||
return changesPending;
|
return changesPending;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +201,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void applyPressed()
|
public void applyPressed()
|
||||||
{
|
{
|
||||||
setState(STATE_APPLIED);
|
setState(ISystemEditPaneStates.STATE_APPLIED);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -210,7 +209,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public void resetPressed()
|
public void resetPressed()
|
||||||
{
|
{
|
||||||
setState(STATE_INITIAL);
|
setState(ISystemEditPaneStates.STATE_INITIAL);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +218,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
*/
|
*/
|
||||||
public boolean areChangesPending()
|
public boolean areChangesPending()
|
||||||
{
|
{
|
||||||
return (state == STATE_PENDING);
|
return (state == ISystemEditPaneStates.STATE_PENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------
|
// -----------------------------------
|
||||||
|
@ -289,15 +288,15 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
boolean enableReset = false;
|
boolean enableReset = false;
|
||||||
switch(state)
|
switch(state)
|
||||||
{
|
{
|
||||||
case STATE_INITIAL:
|
case ISystemEditPaneStates.STATE_INITIAL:
|
||||||
enableApply = false;
|
enableApply = false;
|
||||||
enableReset = false;
|
enableReset = false;
|
||||||
break;
|
break;
|
||||||
case STATE_APPLIED:
|
case ISystemEditPaneStates.STATE_APPLIED:
|
||||||
enableApply = false;
|
enableApply = false;
|
||||||
enableReset = false; // true; only true if reset returns to pre-applied values. Not usually the case
|
enableReset = false; // true; only true if reset returns to pre-applied values. Not usually the case
|
||||||
break;
|
break;
|
||||||
case STATE_PENDING:
|
case ISystemEditPaneStates.STATE_PENDING:
|
||||||
enableApply = true;
|
enableApply = true;
|
||||||
enableReset = true;
|
enableReset = true;
|
||||||
break;
|
break;
|
||||||
|
@ -315,7 +314,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
{
|
{
|
||||||
if (oldMode != newMode)
|
if (oldMode != newMode)
|
||||||
{
|
{
|
||||||
if ((newMode == MODE_NEW) && applyLabelMode)
|
if ((newMode == ISystemEditPaneStates.MODE_NEW) && applyLabelMode)
|
||||||
{
|
{
|
||||||
applyButton.setText(applyLabel_newMode);
|
applyButton.setText(applyLabel_newMode);
|
||||||
applyButton.setToolTipText(applyTip_newMode);
|
applyButton.setToolTipText(applyTip_newMode);
|
||||||
|
@ -331,7 +330,7 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((newMode == MODE_EDIT) && !applyLabelMode)
|
else if ((newMode == ISystemEditPaneStates.MODE_EDIT) && !applyLabelMode)
|
||||||
{
|
{
|
||||||
applyButton.setText(applyLabel_applyMode);
|
applyButton.setText(applyLabel_applyMode);
|
||||||
applyButton.setToolTipText(applyTip_applyMode);
|
applyButton.setToolTipText(applyTip_applyMode);
|
||||||
|
@ -426,24 +425,24 @@ public class SystemEditPaneStateMachine implements ISystemEditPaneStates
|
||||||
{
|
{
|
||||||
switch(backupMode)
|
switch(backupMode)
|
||||||
{
|
{
|
||||||
case MODE_UNSET:
|
case ISystemEditPaneStates.MODE_UNSET:
|
||||||
setUnsetMode();
|
setUnsetMode();
|
||||||
break;
|
break;
|
||||||
case MODE_NEW:
|
case ISystemEditPaneStates.MODE_NEW:
|
||||||
setNewMode();
|
setNewMode();
|
||||||
break;
|
break;
|
||||||
case MODE_EDIT:
|
case ISystemEditPaneStates.MODE_EDIT:
|
||||||
setEditMode();
|
setEditMode();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(backupState)
|
switch(backupState)
|
||||||
{
|
{
|
||||||
case STATE_PENDING:
|
case ISystemEditPaneStates.STATE_PENDING:
|
||||||
setChangesMade();
|
setChangesMade();
|
||||||
break;
|
break;
|
||||||
case STATE_INITIAL:
|
case ISystemEditPaneStates.STATE_INITIAL:
|
||||||
break;
|
break;
|
||||||
case STATE_APPLIED:
|
case ISystemEditPaneStates.STATE_APPLIED:
|
||||||
applyPressed();
|
applyPressed();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||||
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
* David Dykstal (IBM) - 142806: refactoring persistence framework
|
||||||
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
|
||||||
|
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.core.subsystems;
|
package org.eclipse.rse.core.subsystems;
|
||||||
|
@ -109,7 +110,9 @@ import org.eclipse.ui.progress.WorkbenchJob;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public abstract class SubSystem extends RSEModelObject implements IAdaptable, ISystemFilterPoolReferenceManagerProvider, ISystemResourceChangeEvents, ISubSystem
|
public abstract class SubSystem extends RSEModelObject
|
||||||
|
implements IAdaptable, ISubSystem,
|
||||||
|
ISystemFilterPoolReferenceManagerProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -1041,13 +1044,13 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterPoolReferenceCreated(ISystemFilterPoolReference newPoolRef) {
|
public void filterEventFilterPoolReferenceCreated(ISystemFilterPoolReference newPoolRef) {
|
||||||
if (getSubSystemConfiguration().showFilterPools()) {
|
if (getSubSystemConfiguration().showFilterPools()) {
|
||||||
fireEvent(newPoolRef, EVENT_ADD, this);
|
fireEvent(newPoolRef, ISystemResourceChangeEvents.EVENT_ADD, this);
|
||||||
fireEvent(newPoolRef, EVENT_REVEAL_AND_SELECT, this);
|
fireEvent(newPoolRef, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, this);
|
||||||
} else {
|
} else {
|
||||||
ISystemFilterPool pool = newPoolRef.getReferencedFilterPool();
|
ISystemFilterPool pool = newPoolRef.getReferencedFilterPool();
|
||||||
if (pool != null && pool.getSystemFilterCount() > 0) {
|
if (pool != null && pool.getSystemFilterCount() > 0) {
|
||||||
ISystemFilterReference[] filterRefs = newPoolRef.getSystemFilterReferences(this);
|
ISystemFilterReference[] filterRefs = newPoolRef.getSystemFilterReferences(this);
|
||||||
fireEvent(filterRefs, EVENT_ADD_MANY, this, -1); // -1 means append to end
|
fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_ADD_MANY, this, -1); // -1 means append to end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -1065,12 +1068,12 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
{
|
{
|
||||||
if (getSubSystemConfiguration().showFilterPools())
|
if (getSubSystemConfiguration().showFilterPools())
|
||||||
{
|
{
|
||||||
fireEvent(filterPoolRef, EVENT_DELETE, this);
|
fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_DELETE, this);
|
||||||
}
|
}
|
||||||
else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
|
else if (filterPoolRef.getReferencedFilterPool().getSystemFilterCount()>0)
|
||||||
{
|
{
|
||||||
ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
|
ISystemFilterReference[] filterRefs = filterPoolRef.getSystemFilterReferences(this);
|
||||||
fireEvent(filterRefs, EVENT_DELETE_MANY, this);
|
fireEvent(filterRefs, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1088,7 +1091,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef)
|
public void filterEventFilterPoolReferenceReset(ISystemFilterPoolReference filterPoolRef)
|
||||||
{
|
{
|
||||||
fireEvent(filterPoolRef, EVENT_PROPERTYSHEET_UPDATE, this); // we assume its a move operation so little impact
|
fireEvent(filterPoolRef, ISystemResourceChangeEvents.EVENT_PROPERTYSHEET_UPDATE, this); // we assume its a move operation so little impact
|
||||||
try {
|
try {
|
||||||
getSubSystemConfiguration().saveSubSystem(this);
|
getSubSystemConfiguration().saveSubSystem(this);
|
||||||
// fire model change event in case any BP code is listening...
|
// fire model change event in case any BP code is listening...
|
||||||
|
@ -1104,7 +1107,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterPoolReferencesReset()
|
public void filterEventFilterPoolReferencesReset()
|
||||||
{
|
{
|
||||||
fireEvent(this, EVENT_CHANGE_CHILDREN, this);
|
fireEvent(this, ISystemResourceChangeEvents.EVENT_CHANGE_CHILDREN, this);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getSubSystemConfiguration().saveSubSystem(this);
|
getSubSystemConfiguration().saveSubSystem(this);
|
||||||
|
@ -1124,7 +1127,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
{
|
{
|
||||||
if (getSubSystemConfiguration().showFilterPools())
|
if (getSubSystemConfiguration().showFilterPools())
|
||||||
{
|
{
|
||||||
fireEvent(poolRef, EVENT_RENAME, this);
|
fireEvent(poolRef, ISystemResourceChangeEvents.EVENT_RENAME, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1143,7 +1146,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterPoolReferencesRePositioned(ISystemFilterPoolReference[] poolRefs, int delta)
|
public void filterEventFilterPoolReferencesRePositioned(ISystemFilterPoolReference[] poolRefs, int delta)
|
||||||
{
|
{
|
||||||
fireEvent(poolRefs, EVENT_MOVE_MANY, this, delta);
|
fireEvent(poolRefs, ISystemResourceChangeEvents.EVENT_MOVE_MANY, this, delta);
|
||||||
try {
|
try {
|
||||||
getSubSystemConfiguration().saveSubSystem(this);
|
getSubSystemConfiguration().saveSubSystem(this);
|
||||||
// fire model change event in case any BP code is listening...
|
// fire model change event in case any BP code is listening...
|
||||||
|
@ -1168,7 +1171,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterCreated(Object selectedObject, ISystemFilter newFilter)
|
public void filterEventFilterCreated(Object selectedObject, ISystemFilter newFilter)
|
||||||
{
|
{
|
||||||
fireEvent(newFilter,EVENT_REVEAL_AND_SELECT,selectedObject);
|
fireEvent(newFilter, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, selectedObject);
|
||||||
}
|
}
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
// FILTER STRING REFERENCE EVENTS...
|
// FILTER STRING REFERENCE EVENTS...
|
||||||
|
@ -1183,7 +1186,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
||||||
*/
|
*/
|
||||||
public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString)
|
public void filterEventFilterStringCreated(Object selectedObject, ISystemFilterString newFilterString)
|
||||||
{
|
{
|
||||||
fireEvent(newFilterString,EVENT_REVEAL_AND_SELECT,selectedObject);
|
fireEvent(newFilterString, ISystemResourceChangeEvents.EVENT_REVEAL_AND_SELECT, selectedObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue