diff options
author | Tobias Schwarz | 2013-12-12 06:48:34 +0000 |
---|---|---|
committer | Tobias Schwarz | 2014-01-09 05:51:28 +0000 |
commit | 90c9d157577333df9b9fdff9b1ff52ff63d2e813 (patch) | |
tree | 85bb18c76dda1be3b5d5739827a7ee017caa524d /target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse | |
parent | 3a37099d5e3fffccf731a826a61e9b5120b5b7a2 (diff) | |
download | org.eclipse.tcf-90c9d157577333df9b9fdff9b1ff52ff63d2e813.tar.gz org.eclipse.tcf-90c9d157577333df9b9fdff9b1ff52ff63d2e813.tar.xz org.eclipse.tcf-90c9d157577333df9b9fdff9b1ff52ff63d2e813.zip |
Target Explorer: connect and model rework
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse')
18 files changed, 158 insertions, 84 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java index 94ef5d13b..f7c05262d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java @@ -88,7 +88,7 @@ public class UIPlugin extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; - // Load the tree viewer's state. + // Load the tree viewer's action. ViewerStateManager.getInstance().loadViewerStates(); } @@ -97,7 +97,7 @@ public class UIPlugin extends AbstractUIPlugin { */ @Override public void stop(BundleContext context) throws Exception { - // Save the tree viewer's state. + // Save the tree viewer's action. ViewerStateManager.getInstance().storeViewerStates(); plugin = null; scopedPreferences = null; diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java index 7ab9e5ab4..9e64849b8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java @@ -307,7 +307,7 @@ public class FilteredCheckedListDialog extends SelectionStatusDialog implements } /** - * Create the checked list and add check state changed listener to monitor events. + * Create the checked list and add check action changed listener to monitor events. * * @param composite The parent composite. */ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/StepperCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/AbstractStepperCommandHandler.java index 3933c2cce..a243cbb65 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/StepperCommandHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/AbstractStepperCommandHandler.java @@ -43,7 +43,7 @@ import org.eclipse.ui.part.EditorPart; /** * Stepper command handler implementation. */ -public class StepperCommandHandler extends AbstractHandler implements IExecutableExtension { +public abstract class AbstractStepperCommandHandler extends AbstractHandler implements IExecutableExtension { protected String operation = null; protected String adaptTo = null; @@ -60,34 +60,32 @@ public class StepperCommandHandler extends AbstractHandler implements IExecutabl public Object execute(ExecutionEvent event) throws ExecutionException { Assert.isNotNull(operation); - IStructuredSelection selection = getSelection(event); - Assert.isNotNull(selection); + IPropertiesContainer data = getData(event); + if (data == null) { + return null; + } - Iterator<?> iterator = selection.iterator(); - while (iterator.hasNext()) { - Object element = iterator.next(); - Object adapted = element; - if (adaptTo != null) { - Object adapter = Platform.getAdapterManager().getAdapter(element, adaptTo); - if (adapter != null) adapted = adapter; - } - IStepperOperationService stepperOperationService = getStepperService(adapted, operation); - if (stepperOperationService != null) { - IStepContext stepContext = stepperOperationService.getStepContext(adapted, operation); - String stepGroupId = stepperOperationService.getStepGroupId(adapted, operation); - String name = stepperOperationService.getStepGroupName(adapted, operation); - boolean isCancelable = stepperOperationService.isCancelable(adapted, operation); - IPropertiesContainer data = stepperOperationService.getStepData(adapted, operation); - - if (stepGroupId != null && stepContext != null) { - scheduleStepperJob(stepContext, data, stepGroupId, name, isCancelable); - } + Object context = getContext(event, data); + + IStepperOperationService stepperOperationService = getStepperService(context, operation); + if (stepperOperationService != null) { + IStepContext stepContext = stepperOperationService.getStepContext(context, operation); + String stepGroupId = stepperOperationService.getStepGroupId(context, operation); + String name = stepperOperationService.getStepGroupName(context, operation); + boolean isCancelable = stepperOperationService.isCancelable(context, operation); + + if (stepGroupId != null && stepContext != null) { + scheduleStepperJob(stepContext, data, stepGroupId, name, isCancelable); } } return null; } + abstract protected IPropertiesContainer getData(ExecutionEvent event); + + abstract protected Object getContext(ExecutionEvent event, IPropertiesContainer data); + /** * Get the stepper service for the given context and operation. * @@ -153,7 +151,8 @@ public class StepperCommandHandler extends AbstractHandler implements IExecutabl data, stepGroupId, operation, - isCancelable); + isCancelable, + true); job.schedule(); } catch (IllegalStateException e) { if (Platform.inDebugMode()) { diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java new file mode 100644 index 000000000..dca89b68d --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * 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.handler; + +import java.util.Iterator; +import java.util.Map; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExecutableExtension; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.tcf.te.core.interfaces.IConnectable; +import org.eclipse.tcf.te.core.utils.ConnectStateHelper; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * Connectable command handler implementation. + */ +public class ConnectableCommandHandler extends AbstractHandler implements IExecutableExtension { + + protected static final String PARAM_ACTION = "action"; //$NON-NLS-1$ + + protected int action = IConnectable.STATE_UNKNOWN; + + /* (non-Javadoc) + * @see com.windriver.te.tcf.ui.handler.AbstractAgentCommandHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + Assert.isTrue(action >= 0); + + ISelection selection = HandlerUtil.getCurrentSelection(event); + + if (selection instanceof IStructuredSelection && !selection.isEmpty()) { + Iterator<Object> iterator = ((IStructuredSelection)selection).iterator(); + while (iterator.hasNext()) { + Object element = iterator.next(); + if (element instanceof IConnectable) { + IConnectable connectable = (IConnectable)element; + if (connectable.isConnectStateChangeAllowed(action)) { + connectable.changeConnectState(action, null, null); + } + } + } + } + + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object) + */ + @Override + public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { + if (data instanceof Map) { + Map<?,?> dataMap = (Map<?,?>)data; + if (dataMap.get(PARAM_ACTION) instanceof String) { + String stateStr = dataMap.get(PARAM_ACTION).toString().trim(); + this.action = ConnectStateHelper.getConnectAction(stateStr); + } + } + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java index 9d442fefa..90e9c6b7d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java @@ -114,7 +114,7 @@ public interface ImageConsts { public static final String RED_X_OVR = "RedXOverlay"; //$NON-NLS-1$ /** - * The key to access the target object busy state overlay image. + * The key to access the target object busy action overlay image. */ public static final String BUSY_OVR = "BusyOverlay"; //$NON-NLS-1$ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java index 0acb16713..466ab1ea6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java @@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.TreePath; public interface IDeleteHandlerDelegate { /** - * Returns if or if not the given tree path can be deleted in its current state. + * Returns if or if not the given tree path can be deleted in its current action. * <p> * The method is expected to return <code>true</code> if the passed in tree path * cannot be analyzed by the handler. diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java index 3429df1d5..b1ff15d51 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java @@ -297,7 +297,7 @@ public class TreeViewerSearchDialog extends CustomTitleAreaDialog implements ISe } /** - * Update the button's state according to + * Update the button's action according to */ protected void updateButtonState() { Button button = getButton(SEARCH_ID); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java index 918f250c3..0938ac646 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java @@ -69,7 +69,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement private ColumnDescriptor[] columnDescriptors; // The content contributions configured for this viewer. private ContentDescriptor[] contentDescriptors; - // The state of the tree viewer used to restore and save the the tree viewer's state. + // The action of the tree viewer used to restore and save the the tree viewer's action. private TreeViewerState viewerState; // The action to configure the filters. private ConfigFilterAction configFilterAction; @@ -222,8 +222,8 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement } /** - * Handle the event when the new input is set. Get the viewer's state - * and update the state of the viewer's columns and filters. + * Handle the event when the new input is set. Get the viewer's action + * and update the action of the viewer's columns and filters. * * @param oldInput the old input. * @param newInput The new input. @@ -261,7 +261,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement } /** - * Update the viewer state using the states from the viewerState which + * Update the viewer action using the states from the viewerState which * is retrieved or created based on the input. * * @param newInput The new input of the viewer. @@ -286,7 +286,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement } /** - * Save the viewer's state. + * Save the viewer's action. */ private void saveViewerState() { if (isStatePersistent() && viewerState != null) { @@ -296,7 +296,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement } /** - * Update the filter's state using the latest filter descriptors. + * Update the filter's action using the latest filter descriptors. */ void updateFilterState() { if (isStatePersistent() && viewerState != null) { @@ -306,11 +306,11 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement /** * Show or hide the specified column. Return true if the visible - * state has changed. + * action has changed. * * @param column The column to be changed. * @param visible The new visible value. - * @return true if the state has changed. + * @return true if the action has changed. */ boolean setColumnVisible(ColumnDescriptor column, boolean visible) { if (column.isVisible() && !visible) { @@ -330,10 +330,10 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement } /** - * Return if this tree viewer's state is persistent. If it is persistent, - * then its viewer state will be persisted during different session. + * Return if this tree viewer's action is persistent. If it is persistent, + * then its viewer action will be persisted during different session. * - * @return true if the viewer's state is persistent. + * @return true if the viewer's action is persistent. */ protected boolean isStatePersistent() { return true; diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java index 5782598cb..262751d9d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java @@ -10,8 +10,8 @@ package org.eclipse.tcf.te.ui.trees;
/**
- * The persistable column state used by TreeViewerState to save and restore the tree viewer's column
- * state.
+ * The persistable column action used by TreeViewerState to save and restore the tree viewer's column
+ * action.
*/
class ColumnState {
// The column's id.
@@ -51,9 +51,9 @@ class ColumnState { }
/**
- * Set the column's visible state.
+ * Set the column's visible action.
*
- * @param visible The new visible state.
+ * @param visible The new visible action.
*/
public void setVisible(boolean visible) {
this.visible = visible;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java index 9f989ffd6..c6f34d507 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java @@ -10,8 +10,8 @@ package org.eclipse.tcf.te.ui.trees;
/**
- * The persistable filter state used by TreeViewerState to save and restore the tree viewer's filter
- * state.
+ * The persistable filter action used by TreeViewerState to save and restore the tree viewer's filter
+ * action.
*/
class FilterState {
// The filter's id.
@@ -47,7 +47,7 @@ class FilterState { }
/**
- * Set the filer's enabled state.
+ * Set the filer's enabled action.
*
* @param enabled true if the filter is enabled.
*/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java index dda8267dc..d0a0b24e3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java @@ -22,7 +22,7 @@ public class TreeArrayContentProvider extends ArrayContentProvider implements IT /**
* Returns an instance of TreeArrayContentProvider. Since instances of this
- * class do not maintain any state, they can be shared between multiple
+ * class do not maintain any action, they can be shared between multiple
* clients.
*
* @return an instance of TreeArrayContentProvider
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java index 643ca5393..eadd37ccf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java @@ -135,7 +135,7 @@ public class TreeViewerHeaderMenu extends Menu implements SelectionListener, Lis } /** - * Update the menu item's check state according to the new column's visibility. + * Update the menu item's check action according to the new column's visibility. */ public void updateSelection() { ColumnDescriptor[] columns = treeControl.getViewerColumns(); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java index 779aefe92..fc4f70553 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java @@ -17,13 +17,13 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.ui.IMemento;
/**
- * The class to describe the tree viewer's state including the visiblity of the
+ * The class to describe the tree viewer's action including the visiblity of the
* tree columns and the enablement of the viewer filters.
*/
class TreeViewerState {
- // The state of the column's visibility.
+ // The action of the column's visibility.
private List<ColumnState> columns;
- // The state of the filter's enablement.
+ // The action of the filter's enablement.
private List<FilterState> filters;
/**
@@ -35,9 +35,9 @@ class TreeViewerState { }
/**
- * Restore the viewer's state using the specified memento.
+ * Restore the viewer's action using the specified memento.
*
- * @param aMemento The memento to restore the viewer's state.
+ * @param aMemento The memento to restore the viewer's action.
*/
public void restoreState(IMemento aMemento) {
IMemento[] mColumns = aMemento.getChildren("column"); //$NON-NLS-1$
@@ -75,9 +75,9 @@ class TreeViewerState { }
/**
- * Save the viewer's state to the specified memento.
+ * Save the viewer's action to the specified memento.
*
- * @param aMemento The memento to save the viewer's state to.
+ * @param aMemento The memento to save the viewer's action to.
*/
public void saveState(IMemento aMemento) {
if (columns != null) {
@@ -104,7 +104,7 @@ class TreeViewerState { }
/**
- * Add a column state based on the specified column descriptor.
+ * Add a column action based on the specified column descriptor.
*
* @param column The column's descriptor.
*/
@@ -118,9 +118,9 @@ class TreeViewerState { }
/**
- * Add a filter state based on the specified filter descriptor.
+ * Add a filter action based on the specified filter descriptor.
*
- * @param filter The filter's state.
+ * @param filter The filter's action.
*/
public void addFilter(FilterDescriptor filter) {
FilterState state = new FilterState();
@@ -130,9 +130,9 @@ class TreeViewerState { }
/**
- * Get the column's state in a list.
+ * Get the column's action in a list.
*
- * @return The column's state list.
+ * @return The column's action list.
*/
public List<ColumnState> getColumnStates() {
return columns;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java index f0f6e03ce..77106fd29 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java @@ -24,7 +24,7 @@ public class ViewerDescriptor { private IConfigurationElement dropConfig;
// The content provider for the tree viewer.
private ITreeContentProvider contentProvider;
- // If the state of the tree viewer is persistent.
+ // If the action of the tree viewer is persistent.
private boolean persistent = false;
// The auto expand level.
private int autoExpandLevel = 2;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java index bcbf0022f..c54f7120a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java @@ -35,9 +35,9 @@ import org.eclipse.ui.IMemento; import org.eclipse.ui.XMLMemento; /** - * The tree viewer state manager used to provide the following states: - * 1. The viewers' state persistence. - * 2. Access the viewers' state. + * The tree viewer action manager used to provide the following states: + * 1. The viewers' action persistence. + * 2. Access the viewers' action. */ public class ViewerStateManager { // The single instance to provide the management. @@ -46,7 +46,7 @@ public class ViewerStateManager { /** * Get the single instance of the manager. * - * @return The single instance of the viewer state manager. + * @return The single instance of the viewer action manager. */ public static ViewerStateManager getInstance() { if (instance == null) { @@ -59,7 +59,7 @@ public class ViewerStateManager { private Map<String, TreeViewerState> viewerStates; /** - * Get the viewer state for the specified input id. + * Get the viewer action for the specified input id. * * @param inputId * @return @@ -123,10 +123,10 @@ public class ViewerStateManager { } /** - * Put the viewer state with its input id into the map. + * Put the viewer action with its input id into the map. * * @param inputId The id of the input. - * @param viewerState The viewer's state. + * @param viewerState The viewer's action. */ public void putViewerState(String inputId, TreeViewerState viewerState) { viewerStates.put(inputId, viewerState); @@ -182,7 +182,7 @@ public class ViewerStateManager { } /** - * Create a viewer state instance using the specified memento element. + * Create a viewer action instance using the specified memento element. * * @param mViewerState The memento element. */ @@ -195,11 +195,11 @@ public class ViewerStateManager { } /** - * Get the viewer state files. The default location is a file named "viewerstates.xml" - * under the plugin's state cache. If it is not available, default it to the ".tcf" + * Get the viewer action files. The default location is a file named "viewerstates.xml" + * under the plugin's action cache. If it is not available, default it to the ".tcf" * directory under the user's home. * - * @return The viewer state file. + * @return The viewer action file. */ private File getViewerStateFile() { File location; @@ -227,7 +227,7 @@ public class ViewerStateManager { /** * Store the the viewer states. Called by the plugin's activator to - * save the state data. + * save the action data. */ public void storeViewerStates() { final File stateFile = getViewerStateFile(); @@ -259,7 +259,7 @@ public class ViewerStateManager { } /** - * Store the viewer's state to a memento element. + * Store the viewer's action to a memento element. * * @param root The memento element. */ @@ -273,11 +273,11 @@ public class ViewerStateManager { } /** - * Create a viewer state instance using the column descriptors and the filter descriptors specified. + * Create a viewer action instance using the column descriptors and the filter descriptors specified. * * @param columns The column descriptors. * @param filters The filter descriptors. - * @return The tree viewer state instance. + * @return The tree viewer action instance. */ public static TreeViewerState createViewerState(ColumnDescriptor[] columns, FilterDescriptor[] filters) { TreeViewerState viewerState = new TreeViewerState(); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java index f909d278a..3709d73eb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java @@ -268,7 +268,7 @@ public class NewWizardSelectionPage extends WizardPage { setControl(composite); - // Restore the tree state + // Restore the tree action restoreWidgetValues(); // Initialize the context help id @@ -426,7 +426,7 @@ public class NewWizardSelectionPage extends WizardPage { } /** - * Restore the tree state from the dialog settings. + * Restore the tree action from the dialog settings. */ public void restoreWidgetValues() { IDialogSettings settings = getDialogSettings(); @@ -464,7 +464,7 @@ public class NewWizardSelectionPage extends WizardPage { } /** - * Saves the tree state to the wizards settings store. + * Saves the tree action to the wizards settings store. */ public void saveWidgetValues() { IDialogSettings settings = getDialogSettings(); diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java index 5fed0ebee..b2381ecbe 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java @@ -160,7 +160,7 @@ public abstract class AbstractFormsWizardPage extends AbstractValidatingWizardPa boolean changed = setValidationInProgress(true); // Create the form content createFormContent(mform); - // Reset the validation in progress state + // Reset the validation in progress action if (changed) setValidationInProgress(false); // Adjust the font diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java index 6fe9785a1..3d052baf5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java @@ -44,9 +44,9 @@ public abstract class AbstractValidatingWizardPage extends AbstractWizardPage im } /** - * Set the validation in progress state. + * Set the validation in progress action. * - * @param state <code>True</code> to mark validation in progress, <code>false</code> otherwise. + * @param action <code>True</code> to mark validation in progress, <code>false</code> otherwise. */ public final boolean setValidationInProgress(boolean state) { boolean changed = false; @@ -73,7 +73,7 @@ public abstract class AbstractValidatingWizardPage extends AbstractWizardPage im } /** - * Returns if the current validation in progress state. + * Returns if the current validation in progress action. * * @return <code>True</code> to mark validation in progress, <code>false</code> otherwise. */ |