|
From: <caw...@us...> - 2007-07-18 21:45:10
|
Revision: 2792
http://svn.sourceforge.net/rubyeclipse/?rev=2792&view=rev
Author: cawilliams
Date: 2007-07-18 14:45:09 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectAllAction.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/ToggleLinkingAction.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.java 2007-07-18 21:39:52 UTC (rev 2791)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.java 2007-07-18 21:45:09 UTC (rev 2792)
@@ -59,6 +59,9 @@
public static String OpenNewRubyProjectWizardAction_text;
public static String OpenNewRubyProjectWizardAction_description;
public static String OpenNewRubyProjectWizardAction_tooltip;
+
+ public static String SelectAllAction_label;
+ public static String SelectAllAction_tooltip;
static {
NLS.initializeMessages(BUNDLE_NAME, ActionMessages.class);
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectAllAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectAllAction.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectAllAction.java 2007-07-18 21:45:09 UTC (rev 2792)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.internal.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.ui.PlatformUI;
+import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds;
+
+/**
+ * This action selects all entries currently showing in view.
+ */
+public class SelectAllAction extends Action {
+
+ private TableViewer fViewer;
+
+ /**
+ * Creates the action.
+ */
+ public SelectAllAction(TableViewer viewer) {
+ super("selectAll"); //$NON-NLS-1$
+ setText(ActionMessages.SelectAllAction_label);
+ setToolTipText(ActionMessages.SelectAllAction_tooltip);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.SELECT_ALL_ACTION);
+ Assert.isNotNull(viewer);
+ fViewer= viewer;
+ }
+
+ /**
+ * Selects all resources in the view.
+ */
+ public void run() {
+ fViewer.getTable().selectAll();
+ // force viewer selection change
+ fViewer.setSelection(fViewer.getSelection());
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/SelectAllAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/ToggleLinkingAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/ToggleLinkingAction.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/ToggleLinkingAction.java 2007-07-18 21:45:09 UTC (rev 2792)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.internal.ui.typehierarchy;
+
+import org.rubypeople.rdt.internal.ui.actions.AbstractToggleLinkingAction;
+
+
+/**
+ * This action toggles whether the type hierarchy links its selection to the active
+ * editor.
+ *
+ * @since 2.1
+ */
+public class ToggleLinkingAction extends AbstractToggleLinkingAction {
+
+ TypeHierarchyViewPart fHierarchyViewPart;
+
+ /**
+ * Constructs a new action.
+ */
+ public ToggleLinkingAction(TypeHierarchyViewPart part) {
+ setChecked(part.isLinkingEnabled());
+ fHierarchyViewPart= part;
+ }
+
+ /**
+ * Runs the action.
+ */
+ public void run() {
+ fHierarchyViewPart.setLinkingEnabled(isChecked());
+ }
+
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/ToggleLinkingAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|