You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(41) |
Apr
(9) |
May
|
Jun
|
Jul
(39) |
Aug
(38) |
Sep
(135) |
Oct
(220) |
Nov
(75) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(44) |
Feb
(160) |
Mar
(49) |
Apr
(69) |
May
(40) |
Jun
(52) |
Jul
(47) |
Aug
(51) |
Sep
(19) |
Oct
(22) |
Nov
(36) |
Dec
(76) |
| 2007 |
Jan
(154) |
Feb
(165) |
Mar
(186) |
Apr
(143) |
May
(175) |
Jun
(133) |
Jul
(203) |
Aug
(177) |
Sep
(136) |
Oct
|
Nov
|
Dec
|
|
From: <caw...@us...> - 2007-09-13 17:41:42
|
Revision: 3172
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3172&view=rev
Author: cawilliams
Date: 2007-09-13 10:41:41 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
associate the launch action set with Ruby Explorer, Type Hierarchy, Ruby editors, Ruby browsing perspective views
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/plugin.xml
Modified: trunk/org.rubypeople.rdt.debug.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-13 17:41:08 UTC (rev 3171)
+++ trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-13 17:41:41 UTC (rev 3172)
@@ -301,12 +301,6 @@
id="org.rubypeople.rdt.debug.ui.RDTDebugActionSet"
label="Ruby Debug"
visible="true">
- <menu
- id="org.eclipse.ui.run"
- label="Run"
- path="additions">
- <separator name="breakpointGroup"/>
- </menu>
<action
definitionId="org.rubypeople.rdt.debug.ui.commands.ModifyCatchpoint"
label="%modifyCatchpoint.label"
@@ -318,6 +312,35 @@
</action>
</actionSet>
</extension>
+
+ <extension
+ point="org.eclipse.ui.actionSetPartAssociations">
+ <actionSetPartAssociation
+ targetID="org.eclipse.debug.ui.launchActionSet">
+ <part
+ id="org.rubypeople.rdt.ui.RubyExplorer">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.TypeHierarchy">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.EditorRubyFile">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.ExternalRubyEditor">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.ProjectsView">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.TypesView">
+ </part>
+ <part
+ id="org.rubypeople.rdt.ui.MembersView">
+ </part>
+ </actionSetPartAssociation>
+ </extension>
+
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 17:41:11
|
Revision: 3171
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3171&view=rev
Author: cawilliams
Date: 2007-09-13 10:41:08 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
add RubyMigrationDelegate
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/plugin.xml
Added Paths:
-----------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyMigrationDelegate.java
Modified: trunk/org.rubypeople.rdt.launching/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.launching/plugin.xml 2007-09-13 17:07:57 UTC (rev 3170)
+++ trunk/org.rubypeople.rdt.launching/plugin.xml 2007-09-13 17:41:08 UTC (rev 3171)
@@ -21,7 +21,8 @@
<launchConfigurationType
delegate="org.rubypeople.rdt.launching.RubyLaunchDelegate"
id="org.rubypeople.rdt.launching.LaunchConfigurationTypeRubyApplication"
- modes="run,debug"
+ migrationDelegate="org.rubypeople.rdt.internal.launching.RubyMigrationDelegate"
+ modes="run, debug"
name="%LaunchConfigurationTypeRubyApplication.name"
public="true"
sourceLocatorId="org.rubypeople.rdt.debug.ui.rubySourceLocator">
Added: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyMigrationDelegate.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyMigrationDelegate.java (rev 0)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyMigrationDelegate.java 2007-09-13 17:41:08 UTC (rev 3171)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 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.launching;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
+
+/**
+ * Delegate for migrating Ruby launch configurations.
+ * The migration process involves a resource mapping being created such that launch configurations
+ * can be filtered from the launch configuration dialog based on resource availability
+ *
+ * @since 3.2
+ */
+public class RubyMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
+
+ /**
+ * represents the empty string
+ */
+ protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * Constructor needed for reflection
+ */
+ public RubyMigrationDelegate() {}
+
+ /**
+ * Method to get the projects for the specified launch configuration that should be mapped to the launch configuration
+ *
+ * @param candidate the launch configuration that the projects will be mapped to.
+ * @return a list of the projects to be mapped or an empty list, never null.
+ * @throws CoreException
+ */
+ protected IProject[] getProjectsForCandidate(ILaunchConfiguration candidate) throws CoreException {
+ String pname = candidate.getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING);
+ return new IProject[] {ResourcesPlugin.getWorkspace().getRoot().getProject(pname)};
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#isCandidate()
+ */
+ public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
+ if(candidate.getAttribute(IRubyLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING).equals(EMPTY_STRING)) {
+ return false;
+ }
+ IResource[] mappedResources = candidate.getMappedResources();
+ if(mappedResources != null && mappedResources.length > 0) {
+ return false;
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#migrate(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ public void migrate(ILaunchConfiguration candidate) throws CoreException {
+ IProject[] projects = getProjectsForCandidate(candidate);
+ ArrayList mappings = new ArrayList();
+ for(int i = 0; i < projects.length; i++) {
+ if(!mappings.contains(projects[i])) {
+ mappings.add(projects[i]);
+ }
+ }
+ ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
+ wc.setMappedResources((IResource[])mappings.toArray(new IResource[mappings.size()]));
+ wc.doSave();
+ }
+
+}
Property changes on: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyMigrationDelegate.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.
|
|
From: <caw...@us...> - 2007-09-13 17:08:02
|
Revision: 3170
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3170&view=rev
Author: cawilliams
Date: 2007-09-13 10:07:57 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
fix #5730 - Editor unable to open a malformed .rb file
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/TC_RubyPartitionScanner.java
Modified: trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/TC_RubyPartitionScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/TC_RubyPartitionScanner.java 2007-09-13 17:07:52 UTC (rev 3169)
+++ trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/text/TC_RubyPartitionScanner.java 2007-09-13 17:07:57 UTC (rev 3170)
@@ -32,6 +32,17 @@
getContentType("%[\"#{\"]", 0);
assert(true);
}
+
+ /**
+ * http://www.aptana.com/trac/ticket/5730
+ */
+ public void testBug5730() {
+ getContentType("# Comment\n" +
+ "=begin\n" +
+ "puts 'hi'\n" +
+ "=ne", 0);
+ assert(true);
+ }
public void testPartitioningOfSingleLineComment() {
String source = "# This is a comment\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 17:07:54
|
Revision: 3169
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3169&view=rev
Author: cawilliams
Date: 2007-09-13 10:07:52 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
fix #5730 - Editor unable to open a malformed .rb file
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-09-13 14:10:25 UTC (rev 3168)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/RubyPartitionScanner.java 2007-09-13 17:07:52 UTC (rev 3169)
@@ -185,10 +185,22 @@
}
} catch (SyntaxException se) {
if (se.getMessage().equals("embedded document meets end of file")) {
+ // Add to the queue (at end), then try to just do the rest of the file...
// TODO recover somehow by removing this chunk out of the fContents?
- setOffset(se.getPosition().getStartOffset());
- fLength = fContents.length() - se.getPosition().getStartOffset();
- return new Token(RUBY_MULTI_LINE_COMMENT);
+ int start = se.getPosition().getStartOffset();
+ int length = fContents.length() - start;
+ QueuedToken qtoken = new QueuedToken(new Token(RUBY_MULTI_LINE_COMMENT), start, length);
+ RubyPartitionScanner scanner = new RubyPartitionScanner();
+ String possible = fContents.substring(0, se.getPosition().getStartOffset());
+ IDocument document = new Document(possible);
+ scanner.setRange(document, 0, possible.length());
+ IToken token;
+ while (!(token = scanner.nextToken()).isEOF()) {
+ push(new QueuedToken(token, scanner.getTokenOffset() + fOffset, scanner.getTokenLength()));
+ }
+ push(qtoken);
+ push(new QueuedToken(Token.EOF, start + length, 0));
+ return popTokenOffQueue();
}
if (lexerSource.getOffset() - origLength == 0)
@@ -529,4 +541,4 @@
return stack.get(stack.size() - 1);
}
}
-}
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 14:10:27
|
Revision: 3168
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3168&view=rev
Author: cawilliams
Date: 2007-09-13 07:10:25 -0700 (Thu, 13 Sep 2007)
Log Message:
-----------
really fix memento creation for methods. Before we used wrong handle memento delimeter (fixed that previosuly). Now fixed that we include parameter names in the string
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java 2007-09-13 01:08:54 UTC (rev 3167)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java 2007-09-13 14:10:25 UTC (rev 3168)
@@ -52,6 +52,24 @@
}
/**
+ * @see RubyElement#getHandleMemento(StringBuffer)
+ */
+ protected void getHandleMemento(StringBuffer buff) {
+ ((RubyElement) getParent()).getHandleMemento(buff);
+ char delimiter = getHandleMementoDelimiter();
+ buff.append(delimiter);
+ escapeMementoName(buff, getElementName());
+ for (int i = 0; i < this.parameterNames.length; i++) {
+ buff.append(delimiter);
+ escapeMementoName(buff, this.parameterNames[i]);
+ }
+ if (this.occurrenceCount > 1) {
+ buff.append(JEM_COUNT);
+ buff.append(this.occurrenceCount);
+ }
+ }
+
+ /**
* @see RubyElement#getHandleMemento()
*/
protected char getHandleMementoDelimiter() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 01:08:56
|
Revision: 3167
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3167&view=rev
Author: cawilliams
Date: 2007-09-12 18:08:54 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java 2007-09-13 01:08:44 UTC (rev 3166)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java 2007-09-13 01:08:54 UTC (rev 3167)
@@ -25,7 +25,7 @@
import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
/**
* This action reveals the currently selected Ruby element in the
- * package explorer.
+ * ruby explorer.
* <p>
* The action is applicable to selections containing elements of type
* <code>IRubyElement</code>.
@@ -40,7 +40,7 @@
private RubyEditor fEditor;
/**
- * Creates a new <code>ShowInPackageViewAction</code>. The action requires
+ * Creates a new <code>ShowInRubyExplorerViewAction</code>. The action requires
* that the selection provided by the site's selection provider is of type
* <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
@@ -107,11 +107,7 @@
run((IRubyElement)selection.getFirstElement());
}
- /*
- * No Rubydoc. The method should be internal but can't be changed since
- * we shipped it with a public visibility
- */
- public void run(IRubyElement element) {
+ private void run(IRubyElement element) {
if (element == null)
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 01:08:49
|
Revision: 3166
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3166&view=rev
Author: cawilliams
Date: 2007-09-12 18:08:44 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
fix memento creation for methods
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java 2007-09-13 00:24:01 UTC (rev 3165)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyMethod.java 2007-09-13 01:08:44 UTC (rev 3166)
@@ -50,6 +50,13 @@
public int getElementType() {
return RubyElement.METHOD;
}
+
+ /**
+ * @see RubyElement#getHandleMemento()
+ */
+ protected char getHandleMementoDelimiter() {
+ return RubyElement.JEM_METHOD;
+ }
/*
* @see RubyElement#getPrimaryElement(boolean)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-13 00:24:03
|
Revision: 3165
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3165&view=rev
Author: cawilliams
Date: 2007-09-12 17:24:01 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
be able to convert ISourceFolder and ISourceFolderRoot to IResource (except external ones)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyElementAdapterFactory.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyElementAdapterFactory.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyElementAdapterFactory.java 2007-09-12 20:42:28 UTC (rev 3164)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyElementAdapterFactory.java 2007-09-13 00:24:01 UTC (rev 3165)
@@ -17,6 +17,8 @@
import org.eclipse.ui.views.tasklist.ITaskListResourceAdapter;
import org.rubypeople.rdt.core.IRubyElement;
import org.rubypeople.rdt.core.IRubyScript;
+import org.rubypeople.rdt.core.ISourceFolder;
+import org.rubypeople.rdt.core.ISourceFolderRoot;
import org.rubypeople.rdt.internal.corext.util.RubyModelUtil;
/**
@@ -48,12 +50,25 @@
// corresponding resource
switch (element.getElementType()) {
case IRubyElement.TYPE:
- // top level types behave like the CU
+ // top level types behave like the ruby script
IRubyElement parent = element.getParent();
if (parent instanceof IRubyScript) { return RubyModelUtil.toOriginal((IRubyScript) parent).getResource(); }
return null;
case IRubyElement.SCRIPT:
return RubyModelUtil.toOriginal((IRubyScript) element).getResource();
+ case IRubyElement.SOURCE_FOLDER:
+ ISourceFolder folder = (ISourceFolder) element;
+ ISourceFolderRoot root= (ISourceFolderRoot) element.getAncestor(IRubyElement.SOURCE_FOLDER_ROOT);
+ if (!root.isExternal()) {
+ return element.getResource();
+ }
+ return null;
+ case IRubyElement.SOURCE_FOLDER_ROOT:
+ root = (ISourceFolderRoot) element;
+ if (root.isExternal()) {
+ return null;
+ }
+ return root.getResource();
case IRubyElement.RUBY_PROJECT:
case IRubyElement.RUBY_MODEL:
return element.getResource();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 20:42:30
|
Revision: 3164
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3164&view=rev
Author: cawilliams
Date: 2007-09-12 13:42:28 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
fix toggling of external breakpoints (though it seems that the icon is still messed up).
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java 2007-09-12 20:42:24 UTC (rev 3163)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerAction.java 2007-09-12 20:42:28 UTC (rev 3164)
@@ -30,6 +30,8 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.IUpdate;
import org.rubypeople.rdt.debug.core.RubyLineBreakpoint;
+import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiPlugin;
+import org.rubypeople.rdt.internal.ui.rubyeditor.ExternalFileRubyAnnotationModel;
import org.rubypeople.rdt.internal.ui.rubyeditor.IRubyScriptEditorInput;
/**
@@ -89,22 +91,23 @@
if (model == null) { return breakpoints; }
try {
IResource resource = getResource();
- if (resource == null) resource = ResourcesPlugin.getWorkspace().getRoot();
+ if (resource == null) resource = ResourcesPlugin.getWorkspace().getRoot();
if (resource == null) return breakpoints;
IMarker[] markers = resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER,
- false, IResource.DEPTH_INFINITE);
+ true, IResource.DEPTH_INFINITE);
+ if (markers.length < 1) return breakpoints;
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
IDocument document = getDocument();
for (int i = 0; i < markers.length; i++) {
IBreakpoint breakpoint = breakpointManager.getBreakpoint(markers[i]);
- if (breakpoint != null && breakpointManager.isRegistered(breakpoint) && includesRulerLine(model.getMarkerPosition(markers[i]), document)) {
+ if (breakpoint != null && breakpointManager.isRegistered(breakpoint) && includesRulerLine(model, markers[i], document)) {
breakpoints.add(breakpoint);
}
}
} catch (CoreException x) {
- System.out.println(x.getStatus());
+ RdtDebugUiPlugin.log(x.getStatus());
}
return breakpoints;
}
@@ -131,13 +134,24 @@
* the document the position refers to
* @return <code>true</code> if the line is included by the given position
*/
- protected boolean includesRulerLine(Position position, IDocument document) {
- if (position != null) {
+ protected boolean includesRulerLine(AbstractMarkerAnnotationModel model, IMarker marker, IDocument document) {
+ if (model instanceof ExternalFileRubyAnnotationModel) {
try {
- int markerLine = document.getLineOfOffset(position.getOffset());
+ Integer lineNum = (Integer) marker.getAttribute(IMarker.LINE_NUMBER);
int line = fRuler.getLineOfLastMouseButtonActivity();
- if (line == markerLine) { return true; }
- } catch (BadLocationException x) {}
+ if (line == (lineNum - 1)) { return true; }
+ } catch (CoreException e) {
+ RdtDebugUiPlugin.log(e);
+ }
+ } else {
+ Position position = model.getMarkerPosition(marker);
+ if (position != null) {
+ try {
+ int markerLine = document.getLineOfOffset(position.getOffset());
+ int line = fRuler.getLineOfLastMouseButtonActivity();
+ if (line == markerLine) { return true; }
+ } catch (BadLocationException x) {}
+ }
}
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 20:42:25
|
Revision: 3163
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3163&view=rev
Author: cawilliams
Date: 2007-09-12 13:42:24 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
fix toggling of external breakpoints (though it seems that the icon is still messed up).
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ExternalFileRubyAnnotationModel.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ExternalFileRubyAnnotationModel.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ExternalFileRubyAnnotationModel.java 2007-09-12 20:12:28 UTC (rev 3162)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/ExternalFileRubyAnnotationModel.java 2007-09-12 20:42:24 UTC (rev 3163)
@@ -10,9 +10,11 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.Position;
import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
import org.rubypeople.rdt.core.IRubyScript;
import org.rubypeople.rdt.internal.core.ExternalRubyScript;
+import org.rubypeople.rdt.internal.ui.RubyPlugin;
public class ExternalFileRubyAnnotationModel extends AbstractMarkerAnnotationModel {
@@ -22,6 +24,7 @@
public ExternalFileRubyAnnotationModel(IRubyScript script) {
fScript = script;
fWorkspace= ResourcesPlugin.getWorkspace();
+ // TODO Grab all the markers from workspace root which match this file, and add annotaions for them?
}
protected void deleteMarkers(final IMarker[] markers) throws CoreException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 20:12:29
|
Revision: 3162
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3162&view=rev
Author: cawilliams
Date: 2007-09-12 13:12:28 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
add translation strings for filters
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/plugin.properties
Modified: trunk/org.rubypeople.rdt.ui/plugin.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.properties 2007-09-12 20:06:58 UTC (rev 3161)
+++ trunk/org.rubypeople.rdt.ui/plugin.properties 2007-09-12 20:12:28 UTC (rev 3162)
@@ -276,4 +276,40 @@
InWorkspace.label= &Workspace
InProject.label= &Project
InHierarchy.label= &Hierarchy
-InWorkingSet.label= Working &Set...
\ No newline at end of file
+InWorkingSet.label= Working &Set...
+
+##########################################################################
+# Filter Support
+##########################################################################
+HideSystemFiles.label= .* resources
+HideSystemFiles.description= Hides resources with names that start with a '.'
+
+HideNonRubyElements.label= Non-Ruby elements
+HideNonRubyElements.description= Show only Ruby elements
+
+HideReferencedLibraries.label= Libraries from external
+HideReferencedLibraries.description= Hides external libraries i.e. those not contained inside the project itself
+
+HideRubyFiles.label= Ruby files
+HideRubyFiles.description= Hides all Ruby files
+
+HideImportDeclaration.label= Require/Load declarations
+HideImportDeclaration.description= Hides all require/load declarations
+
+HideNonRubyProjects.label= Non-Ruby projects
+HideNonRubyProjects.description= Shows only Ruby projects
+
+HideNonSharedProjects.label= Non-shared projects
+HideNonSharedProjects.description= Shows only shared projects
+
+HideClosedProjects.label= Closed projects
+HideClosedProjects.description= Hides closed projects
+
+HideFields.label= Instance Variables and Constants
+HideFields.description= Hides instance variables and constants
+
+HideStatics.label= Class-level variables and methods
+HideStatics.description= Hides class-level variables and methods
+
+HideNonPublic.label= Non-public members
+HideNonPublic.description= Hides non-public members
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 20:07:01
|
Revision: 3161
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3161&view=rev
Author: cawilliams
Date: 2007-09-12 13:06:58 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
port some of teh javaElementFilters for JDT's PackageExplorer over to RDT's rubyElementFilters for RubyExplorer
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
trunk/org.rubypeople.rdt.ui/plugin.xml
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FilterDescriptor.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ClosedProjectFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FieldsFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ImportDeclarationFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonPublicFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyElementFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyProjectsFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonSharedProjectFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/RubyFileFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/StaticsFilter.java
Modified: trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-09-12 19:50:25 UTC (rev 3160)
+++ trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-09-12 20:06:58 UTC (rev 3161)
@@ -64,6 +64,7 @@
org.eclipse.ltk.core.refactoring,
com.ibm.icu,
com.aptana.rdt,
- org.eclipse.debug.core
+ org.eclipse.debug.core,
+ org.eclipse.team.core
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/org.rubypeople.rdt.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 19:50:25 UTC (rev 3160)
+++ trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 20:06:58 UTC (rev 3161)
@@ -1560,5 +1560,100 @@
id="org.rubypeople.rdt.internal.ui.text.spelling.DefaultSpellingEngine">
</engine>
</extension>
+
+<!-- =========================================================================== -->
+<!-- Filter Support -->
+<!-- =========================================================================== -->
+ <extension
+ point="org.rubypeople.rdt.ui.rubyElementFilters">
+<!-- Ruby Explorer -->
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideSystemFiles.label"
+ enabled="true"
+ description="%HideSystemFiles.description"
+ pattern=".*">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideNonRubyElements.label"
+ enabled="false"
+ description="%HideNonRubyElements.description"
+ class="org.rubypeople.rdt.internal.ui.filters.NonRubyElementFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.NonRubyElementFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideReferencedLibraries.label"
+ enabled="false"
+ description="%HideReferencedLibraries.description"
+ class="org.rubypeople.rdt.internal.ui.filters.LibraryFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.LibraryFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideRubyFiles.label"
+ enabled="false"
+ description="%HideRubyFiles.description"
+ class="org.rubypeople.rdt.internal.ui.filters.RubyFileFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.RubyFileFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideImportDeclaration.label"
+ enabled="true"
+ description="%HideImportDeclaration.description"
+ class="org.rubypeople.rdt.internal.ui.filters.ImportDeclarationFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.ImportDeclarationFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideNonRubyProjects.label"
+ enabled="false"
+ description="%HideNonRubyProjects.description"
+ class="org.rubypeople.rdt.internal.ui.filters.NonRubyProjectsFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.NonRubyProjectsFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideNonSharedProjects.label"
+ enabled="false"
+ description="%HideNonSharedProjects.description"
+ class="org.rubypeople.rdt.internal.ui.filters.NonSharedProjectFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.NonSharedProjectsFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideClosedProjects.label"
+ enabled="false"
+ description="%HideClosedProjects.description"
+ class="org.rubypeople.rdt.internal.ui.filters.ClosedProjectFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.ClosedProjectsFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideFields.label"
+ enabled="false"
+ description="%HideFields.description"
+ class="org.rubypeople.rdt.internal.ui.filters.FieldsFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.FieldsFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideStatics.label"
+ enabled="false"
+ description="%HideStatics.description"
+ class="org.rubypeople.rdt.internal.ui.filters.StaticsFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.StaticsFilter">
+ </filter>
+ <filter
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ name="%HideNonPublic.label"
+ enabled="false"
+ description="%HideNonPublic.description"
+ class="org.rubypeople.rdt.internal.ui.filters.NonPublicFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.NonPublicFilter">
+ </filter>
+ </extension>
</plugin>
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ClosedProjectFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ClosedProjectFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ClosedProjectFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.filters;
+
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.rubypeople.rdt.core.IRubyElement;
+
+/**
+ * Filters closed projects
+ */
+public class ClosedProjectFilter extends ViewerFilter {
+
+ /*
+ * @see ViewerFilter
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IRubyElement)
+ return ((IRubyElement)element).getRubyProject().getProject().isOpen();
+ if (element instanceof IResource)
+ return ((IResource)element).getProject().isOpen();
+ return true;
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ClosedProjectFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FieldsFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FieldsFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FieldsFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.filters;
+
+import org.rubypeople.rdt.internal.ui.viewsupport.MemberFilter;
+
+/**
+ * Fields filter.
+ *
+ * @since 3.0
+ */
+public class FieldsFilter extends MemberFilter {
+ public FieldsFilter() {
+ addFilter(MemberFilter.FILTER_FIELDS);
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FieldsFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FilterDescriptor.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FilterDescriptor.java 2007-09-12 19:50:25 UTC (rev 3160)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/FilterDescriptor.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -30,7 +30,7 @@
/**
* Represents a custom filter which is provided by the
- * "org.eclipse.jdt.ui.javaElementFilters" extension point.
+ * "org.rubypeople.rdt.ui.rubyElementFilters" extension point.
*
* since 2.0
*/
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ImportDeclarationFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ImportDeclarationFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ImportDeclarationFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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.filters;
+
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.rubypeople.rdt.core.IImportContainer;
+import org.rubypeople.rdt.core.IImportDeclaration;
+
+
+/**
+ * Filters import declarations
+ */
+public class ImportDeclarationFilter extends ViewerFilter {
+
+ /*
+ * @see ViewerFilter
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ return !((element instanceof IImportContainer) || (element instanceof IImportDeclaration));
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/ImportDeclarationFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonPublicFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonPublicFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonPublicFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.filters;
+
+import org.rubypeople.rdt.internal.ui.viewsupport.MemberFilter;
+
+/**
+ * Non-public member filter.
+ *
+ * @since 3.0
+ */
+public class NonPublicFilter extends MemberFilter {
+ public NonPublicFilter() {
+ addFilter(MemberFilter.FILTER_NONPUBLIC);
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonPublicFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyElementFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyElementFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyElementFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.filters;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.rubypeople.rdt.core.IRubyElement;
+
+
+/**
+ * Filters out all non-Ruby elements.
+ */
+public class NonRubyElementFilter extends ViewerFilter {
+
+ /**
+ * Returns the result of this filter, when applied to the
+ * given inputs.
+ *
+ * @return Returns true if element should be included in filtered set
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IRubyElement)
+ return true;
+
+ if (element instanceof IResource) {
+ IProject project= ((IResource)element).getProject();
+ return project == null || !project.isOpen();
+ }
+
+ // Exclude all IStorage elements which are neither Ruby elements nor resources
+ if (element instanceof IStorage)
+ return false;
+
+ return true;
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyElementFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyProjectsFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyProjectsFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyProjectsFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.filters;
+
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.rubypeople.rdt.core.IRubyProject;
+
+/**
+ * Filters non-ruby projects
+ */
+public class NonRubyProjectsFilter extends ViewerFilter {
+
+ /*
+ * @see ViewerFilter
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IRubyProject)
+ return true;
+ else if (element instanceof IProject)
+ return !((IProject)element).isOpen();
+
+ return true;
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonRubyProjectsFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonSharedProjectFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonSharedProjectFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonSharedProjectFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.filters;
+
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.team.core.RepositoryProvider;
+import org.rubypeople.rdt.core.IRubyProject;
+
+/**
+ * Filters non-shared projects and Ruby projects. Non-shared projects are
+ * projects that are not controlled by a team provider.
+ *
+ * @since 2.1
+ */
+public class NonSharedProjectFilter extends ViewerFilter {
+
+ /*
+ * @see ViewerFilter
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IProject)
+ return isSharedProject((IProject)element);
+
+ if (element instanceof IRubyProject)
+ return isSharedProject(((IRubyProject)element).getProject());
+
+ return true;
+ }
+
+ private boolean isSharedProject(IProject project) {
+ return !project.isAccessible() || RepositoryProvider.isShared(project);
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/NonSharedProjectFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/RubyFileFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/RubyFileFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/RubyFileFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.filters;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.rubypeople.rdt.core.IRubyScript;
+import org.rubypeople.rdt.core.ISourceFolder;
+import org.rubypeople.rdt.core.RubyModelException;
+
+
+/**
+ * Filters out all ruby scripts.
+ */
+public class RubyFileFilter extends ViewerFilter {
+
+ /**
+ * Returns the result of this filter, when applied to the
+ * given inputs.
+ *
+ * @return Returns true if element should be included in filtered set
+ */
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ if (element instanceof IRubyScript)
+ return false;
+
+ if (element instanceof ISourceFolder)
+ try {
+ return ((ISourceFolder)element).getNonRubyResources().length > 0;
+ } catch (RubyModelException ex) {
+ return true;
+ }
+ return true;
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/RubyFileFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/StaticsFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/StaticsFilter.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/StaticsFilter.java 2007-09-12 20:06:58 UTC (rev 3161)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.filters;
+
+import org.rubypeople.rdt.internal.ui.viewsupport.MemberFilter;
+
+/**
+ * Statics filter.
+ *
+ * @since 3.0
+ */
+public class StaticsFilter extends MemberFilter {
+ public StaticsFilter() {
+ addFilter(MemberFilter.FILTER_STATIC);
+ }
+}
Property changes on: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/filters/StaticsFilter.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.
|
|
From: <caw...@us...> - 2007-09-12 19:50:29
|
Revision: 3160
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3160&view=rev
Author: cawilliams
Date: 2007-09-12 12:50:25 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
add rename action for resources
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/CCPActionGroup.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/CCPActionGroup.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/CCPActionGroup.java 2007-09-12 19:34:44 UTC (rev 3159)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/CCPActionGroup.java 2007-09-12 19:50:25 UTC (rev 3160)
@@ -14,6 +14,7 @@
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
@@ -21,10 +22,13 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.DeleteResourceAction;
+import org.eclipse.ui.actions.RenameResourceAction;
import org.eclipse.ui.actions.SelectionListenerAction;
import org.eclipse.ui.navigator.ICommonMenuConstants;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+import org.eclipse.ui.views.navigator.ResourceNavigatorRenameAction;
+import org.rubypeople.rdt.ui.IPackagesViewPart;
/**
* Action group that adds the copy, cut, paste actions to a view part's context
@@ -45,10 +49,13 @@
private SelectionListenerAction fDeleteAction;
private SelectionListenerAction fCopyAction;
+ private RenameResourceAction fRenameAction;
// private SelectionDispatchAction fCopyQualifiedNameAction;
private PasteAction fPasteAction;
// private SelectionListenerAction fCutAction;
+ private TreeViewer fTreeViewer;
+
/**
* Creates a new <code>CCPActionGroup</code>. The group requires that
* the selection provided by the view part's selection provider is of type
@@ -56,8 +63,12 @@
*
* @param part the view part that owns this action group
*/
- public CCPActionGroup(IViewPart part) {
- this(part.getSite());
+ public CCPActionGroup(IViewPart part) {
+ if (part instanceof IPackagesViewPart) {
+ IPackagesViewPart pack = (IPackagesViewPart) part;
+ fTreeViewer = pack.getTreeViewer();
+ }
+ init(part.getSite());
}
/**
@@ -71,7 +82,11 @@
this(page.getSite());
}
- private CCPActionGroup(IWorkbenchSite site) {
+ private CCPActionGroup(IWorkbenchSite site) {
+ init(site);
+ }
+
+ private void init(IWorkbenchSite site) {
fSite= site;
fClipboard= new Clipboard(site.getShell().getDisplay());
@@ -87,10 +102,17 @@
// fCutAction= new CutAction(fSite.getShell(), fClipboard, fPasteAction);
// fCutAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
+ if (fTreeViewer != null) {
+ fRenameAction = new ResourceNavigatorRenameAction(fSite.getShell(), fTreeViewer);
+ } else {
+ fRenameAction = new RenameResourceAction(fSite.getShell());
+ }
+ fRenameAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.RENAME);
+
fDeleteAction= new DeleteResourceAction(fSite.getShell());
fDeleteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
- fActions= new SelectionListenerAction[] { /*fCutAction,*/ fCopyAction, /*fCopyQualifiedNameAction,*/ fPasteAction, fDeleteAction };
+ fActions= new SelectionListenerAction[] { /*fCutAction,*/ fCopyAction, /*fCopyQualifiedNameAction,*/ fPasteAction, fDeleteAction, fRenameAction };
registerActionsAsSelectionChangeListeners();
}
@@ -131,6 +153,7 @@
// actionBars.setGlobalActionHandler(CopyQualifiedNameAction.ACTION_HANDLER_ID, fCopyQualifiedNameAction);
// actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), fCutAction);
actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), fPasteAction);
+ actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), fRenameAction);
}
/* (non-Javadoc)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 19:34:46
|
Revision: 3159
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3159&view=rev
Author: cawilliams
Date: 2007-09-12 12:34:44 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
rename id of RubyExplorer view (from org.rubypeople.rdt.ui.PackageExplorer to org.rubypeople.rdt.ui.RubyExplorer)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/plugin.xml
Modified: trunk/org.rubypeople.rdt.debug.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-12 19:34:38 UTC (rev 3158)
+++ trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-12 19:34:44 UTC (rev 3159)
@@ -338,7 +338,7 @@
relative="org.eclipse.ui.console.ConsoleView"
visible="false"/>
<view
- id="org.rubypeople.rdt.ui.PackageExplorer"
+ id="org.rubypeople.rdt.ui.RubyExplorer"
relationship="stack"
relative="org.eclipse.debug.ui.DebugView"
visible="false"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 19:34:41
|
Revision: 3158
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3158&view=rev
Author: cawilliams
Date: 2007-09-12 12:34:38 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
rename id of RubyExplorer view (from org.rubypeople.rdt.ui.PackageExplorer to org.rubypeople.rdt.ui.RubyExplorer)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/plugin.xml
trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java
Modified: trunk/org.rubypeople.rdt.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 19:28:20 UTC (rev 3157)
+++ trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 19:34:38 UTC (rev 3158)
@@ -136,7 +136,7 @@
<newWizardShortcut id="org.eclipse.ui.wizards.new.folder"/>
<newWizardShortcut id="org.eclipse.ui.wizards.new.file"/>
<viewShortcut id="org.eclipse.ui.views.ContentOutline"/>
- <viewShortcut id="org.rubypeople.rdt.ui.PackageExplorer"/>
+ <viewShortcut id="org.rubypeople.rdt.ui.RubyExplorer"/>
<viewShortcut id="org.eclipse.ui.console.ConsoleView"/>
<viewShortcut id="org.eclipse.ui.views.ProblemView"/>
<viewShortcut id="org.eclipse.ui.views.TaskList"/>
@@ -187,7 +187,7 @@
<perspectiveShortcut
id="org.rubypeople.rdt.ui.RubyBrowsingPerspective">
</perspectiveShortcut>
- <showInPart id="org.rubypeople.rdt.ui.PackageExplorer"/>
+ <showInPart id="org.rubypeople.rdt.ui.RubyExplorer"/>
</perspectiveExtension>
<perspectiveExtension
targetID="org.rubypeople.rdt.ui.RubyBrowsingPerspective">
@@ -383,7 +383,7 @@
icon="$nl$/icons/full/ctool16/ruby.gif"
category="org.rubypeople.rdt.ui.ruby"
class="org.rubypeople.rdt.internal.ui.packageview.PackageExplorerPart"
- id="org.rubypeople.rdt.ui.PackageExplorer">
+ id="org.rubypeople.rdt.ui.RubyExplorer">
</view>
<view
name="RI"
@@ -961,7 +961,7 @@
id="org.eclipse.search.SearchResultView">
</part>
<part
- id="org.rubypeople.rdt.ui.PackageExplorer">
+ id="org.rubypeople.rdt.ui.RubyExplorer">
</part>
<part
id="org.rubypeople.rdt.ui.TypeHierarchy">
@@ -1204,7 +1204,7 @@
<actionSetPartAssociation
targetID="org.rubypeople.rdt.ui.SearchActionSet">
<part
- id="org.rubypeople.rdt.ui.PackageExplorer">
+ id="org.rubypeople.rdt.ui.RubyExplorer">
</part>
<part
id="org.rubypeople.rdt.ui.TypeHierarchy">
Modified: trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd
===================================================================
--- trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd 2007-09-12 19:28:20 UTC (rev 3157)
+++ trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd 2007-09-12 19:34:38 UTC (rev 3158)
@@ -124,7 +124,7 @@
<pre>
<extension point="org.rubypeople.rdt.ui.rubyElementFilters">
<filter
- id="org.rubypeople.rdt.ui.PackageExplorer.LibraryFilter"
+ id="org.rubypeople.rdt.ui.RubyExplorer.LibraryFilter"
name="%HideReferencedLibraries.label"
description="%HideReferencedLibraries.description"
targetId="org.rubypeople.rdt.ui.RubyExplorer"
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java 2007-09-12 19:28:20 UTC (rev 3157)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java 2007-09-12 19:34:38 UTC (rev 3158)
@@ -135,7 +135,7 @@
/**
* The view part id of the Packages view
- * (value <code>"org.rubypeople.rdt.ui.PackageExplorer"</code>).
+ * (value <code>"org.rubypeople.rdt.ui.RubyExplorer"</code>).
* <p>
* When this id is used to access
* a view part with <code>IWorkbenchPage.findView</code> or
@@ -147,7 +147,7 @@
* @see org.eclipse.ui.IWorkbenchPage#findView(java.lang.String)
* @see org.eclipse.ui.IWorkbenchPage#showView(java.lang.String)
*/
- public static final String ID_RUBY_EXPLORER= "org.rubypeople.rdt.ui.PackageExplorer"; //$NON-NLS-1$
+ public static final String ID_RUBY_EXPLORER= "org.rubypeople.rdt.ui.RubyExplorer"; //$NON-NLS-1$
/**
* Returns the Ruby element wrapped by the given editor input.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 19:28:26
|
Revision: 3157
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3157&view=rev
Author: cawilliams
Date: 2007-09-12 12:28:20 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
add rubyElementFilters extension point
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/plugin.xml
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd
Modified: trunk/org.rubypeople.rdt.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 18:03:24 UTC (rev 3156)
+++ trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 19:28:20 UTC (rev 3157)
@@ -2,6 +2,7 @@
<?eclipse version="3.0"?>
<plugin>
+ <extension-point id="rubyElementFilters" name="%elementFiltersName" schema="schema/rubyElementFilters.exsd"/>
<extension-point id="textHoverProvider" name="%textHoverProvider" schema="schema/textHoverProvider.exsd"/>
<extension-point id="hyperlinkProvider" name="%hyperlinkProvider" schema="schema/hyperlinkProvider.exsd"/>
<extension-point id="foldingStructureProviders" name="%foldingStructureProviders" schema="schema/foldingStructureProviders.exsd"/>
Added: trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd
===================================================================
--- trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd (rev 0)
+++ trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd 2007-09-12 19:28:20 UTC (rev 3157)
@@ -0,0 +1,168 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.rubypeople.rdt.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.rubypeople.rdt.ui" id="rubyElementFilters" name="Ruby Element Filter Extensions"/>
+ </appInfo>
+ <documentation>
+ This extension point is used to extend Ruby UI views with filters.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="filter" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="filter">
+ <annotation>
+ <appInfo>
+ <meta.element labelAttribute="name"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ a unique id that will be used to identify this filter
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ a unique name that allows to identify this filter in the UI. This attribute should be a translated string. Though this attribute is not required for pattern filters (i.e. those using the <samp>pattern</samp> attribute) we suggest to provide a name anyway, otherwise the pattern string itself would be used to represent the filter in the UI.
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ a short description for this filter
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="targetId" type="string">
+ <annotation>
+ <documentation>
+ the id of the target where this filter is contributed. If this attribute is missing, then the filter will
+be contributed to all views which use the <code>org.rubypeople.rdt.ui.actions.customFiltersActionGroup</code>. This
+replaces the deprecated attributed "viewId".
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="enabled" type="boolean">
+ <annotation>
+ <documentation>
+ the filter will be enabled if this attribute is "true" or if this attribute is not present. Most likely the user will be able to override this setting in the UI.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="pattern" type="string">
+ <annotation>
+ <documentation>
+ elements whose name matches this pattern will be hidden. This attribute is here for backward compatibility and should no longer be used. All views that allow to plug-in a filter also allow to add pattern filters directly via UI.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ the name of the class used to filter the view. The class must extend <code>org.eclipse.jface.viewers.ViewerFilter</code>. If this attribute is here
+then the pattern attribute must not provided.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ViewerFilter"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ The following is an example of Ruby element filter definition. It filters out inner types and is initially selected.
+
+<p>
+<pre>
+ <extension point="org.rubypeople.rdt.ui.rubyElementFilters">
+ <filter
+ id="org.rubypeople.rdt.ui.PackageExplorer.LibraryFilter"
+ name="%HideReferencedLibraries.label"
+ description="%HideReferencedLibraries.description"
+ targetId="org.rubypeople.rdt.ui.RubyExplorer"
+ class="org.rubypeople.rdt.internal.ui.filters.LibraryFilter"
+ enabled="false">
+ </filter>
+ </extension>
+</pre>
+</p>
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2001, 2004 IBM Corporation and others.<br>
+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 <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+ </documentation>
+ </annotation>
+
+</schema>
Property changes on: trunk/org.rubypeople.rdt.ui/schema/rubyElementFilters.exsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 18:03:27
|
Revision: 3156
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3156&view=rev
Author: cawilliams
Date: 2007-09-12 11:03:24 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
replace references to Ruby Resources View with references to new Ruby Explorer view
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/plugin.xml
Modified: trunk/org.rubypeople.rdt.debug.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-12 18:03:19 UTC (rev 3155)
+++ trunk/org.rubypeople.rdt.debug.ui/plugin.xml 2007-09-12 18:03:24 UTC (rev 3156)
@@ -338,7 +338,7 @@
relative="org.eclipse.ui.console.ConsoleView"
visible="false"/>
<view
- id="org.rubypeople.rdt.ui.ViewRubyResources"
+ id="org.rubypeople.rdt.ui.PackageExplorer"
relationship="stack"
relative="org.eclipse.debug.ui.DebugView"
visible="false"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 18:03:22
|
Revision: 3155
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3155&view=rev
Author: cawilliams
Date: 2007-09-12 11:03:19 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
replace references to Ruby Resources View with references to new Ruby Explorer view
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/plugin.properties
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/RdtActionConstants.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java
Modified: trunk/org.rubypeople.rdt.ui/plugin.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.properties 2007-09-12 17:53:36 UTC (rev 3154)
+++ trunk/org.rubypeople.rdt.ui/plugin.properties 2007-09-12 18:03:19 UTC (rev 3155)
@@ -67,7 +67,6 @@
commentHover=Ruby RDoc comment hover
PerspectiveRuby.name=Ruby
-ViewRubyResources.name=Ruby Resources
NewWizardCategory.name=Ruby
NewWizardRubyProject.name=Ruby Project
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java 2007-09-12 17:53:36 UTC (rev 3154)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java 2007-09-12 18:03:19 UTC (rev 3155)
@@ -134,7 +134,7 @@
import org.rubypeople.rdt.ui.actions.OpenViewActionGroup;
import org.rubypeople.rdt.ui.actions.RubyActionGroup;
import org.rubypeople.rdt.ui.actions.RubySearchActionGroup;
-import org.rubypeople.rdt.ui.actions.ShowInRubyResourcesViewAction;
+import org.rubypeople.rdt.ui.actions.ShowInRubyExplorerViewAction;
import org.rubypeople.rdt.ui.actions.SurroundWithBeginRescueAction;
import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProvider;
import org.rubypeople.rdt.ui.text.folding.IRubyFoldingStructureProviderExtension;
@@ -279,7 +279,7 @@
WorkbenchHelp.setHelp(action, IRubyHelpContextIds.TOGGLE_COMMENT_ACTION);
configureToggleCommentAction();
- action= new ShowInRubyResourcesViewAction(this);
+ action= new ShowInRubyExplorerViewAction(this);
action.setActionDefinitionId(IRubyEditorActionDefinitionIds.SHOW_IN_RUBY_RESOURCES_VIEW);
setAction("ShowInPackageView", action); //$NON-NLS-1$
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/RdtActionConstants.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/RdtActionConstants.java 2007-09-12 17:53:36 UTC (rev 3154)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/RdtActionConstants.java 2007-09-12 18:03:19 UTC (rev 3155)
@@ -114,10 +114,4 @@
* (value <code>"org.rubypeople.rdt.ui.actions.WriteAccessInWorkingSet"</code>).
*/
public static final String FIND_WRITE_ACCESS_IN_WORKING_SET= "org.rubypeople.rdt.ui.actions.WriteAccessInWorkingSet"; //$NON-NLS-1$
-
- /**
- * Navigate menu: name of standard Show in Ruby Resources View global action
- * (value <code>"org.rubypeople.rdt.ui.actions.ShowInRubyResourcesView"</code>).
- */
- public static final String SHOW_IN_RESOURCES_VIEW= "org.rubypeople.rdt.ui.actions.ShowInRubyResourcesView"; //$NON-NLS-1$
}
Copied: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java (from rev 3149, trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java)
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyExplorerViewAction.java 2007-09-12 18:03:19 UTC (rev 3155)
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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.ui.actions;
+
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchSite;
+import org.eclipse.ui.PlatformUI;
+import org.rubypeople.rdt.core.IOpenable;
+import org.rubypeople.rdt.core.IRubyElement;
+import org.rubypeople.rdt.core.RubyModelException;
+import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds;
+import org.rubypeople.rdt.internal.ui.RubyPlugin;
+import org.rubypeople.rdt.internal.ui.actions.SelectionConverter;
+import org.rubypeople.rdt.internal.ui.packageview.PackageExplorerPart;
+import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
+/**
+ * This action reveals the currently selected Ruby element in the
+ * package explorer.
+ * <p>
+ * The action is applicable to selections containing elements of type
+ * <code>IRubyElement</code>.
+ *
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ * @since 2.0
+ */
+public class ShowInRubyExplorerViewAction extends SelectionDispatchAction {
+
+ private RubyEditor fEditor;
+
+ /**
+ * Creates a new <code>ShowInPackageViewAction</code>. The action requires
+ * that the selection provided by the site's selection provider is of type
+ * <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
+ *
+ * @param site the site providing context information for this action
+ */
+ public ShowInRubyExplorerViewAction(IWorkbenchSite site) {
+ super(site);
+ setText(ActionMessages.ShowInPackageViewAction_label);
+ setDescription(ActionMessages.ShowInPackageViewAction_description);
+ setToolTipText(ActionMessages.ShowInPackageViewAction_tooltip);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.SHOW_IN_PACKAGEVIEW_ACTION);
+ }
+
+ /**
+ * Note: This constructor is for internal use only. Clients should not call this constructor.
+ * @param editor the Ruby editor
+ */
+ public ShowInRubyExplorerViewAction(RubyEditor editor) {
+ this(editor.getEditorSite());
+ fEditor= editor;
+ setEnabled(SelectionConverter.canOperateOn(fEditor));
+ }
+
+ /* (non-Javadoc)
+ * Method declared on SelectionDispatchAction.
+ */
+ public void selectionChanged(ITextSelection selection) {
+ }
+
+ /* (non-Javadoc)
+ * Method declared on SelectionDispatchAction.
+ */
+ public void selectionChanged(IStructuredSelection selection) {
+ setEnabled(checkEnabled(selection));
+ }
+
+ private boolean checkEnabled(IStructuredSelection selection) {
+ if (selection.size() != 1)
+ return false;
+ return selection.getFirstElement() instanceof IRubyElement;
+ }
+
+ /* (non-Javadoc)
+ * Method declared on SelectionDispatchAction.
+ */
+ public void run(ITextSelection selection) {
+ try {
+ IRubyElement element= SelectionConverter.getElementAtOffset(fEditor);
+ if (element != null)
+ run(element);
+ } catch (RubyModelException e) {
+ RubyPlugin.log(e);
+ String message= ActionMessages.ShowInPackageViewAction_error_message;
+ ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
+ }
+ }
+
+ /* (non-Javadoc)
+ * Method declared on SelectionDispatchAction.
+ */
+ public void run(IStructuredSelection selection) {
+ if (!checkEnabled(selection))
+ return;
+ run((IRubyElement)selection.getFirstElement());
+ }
+
+ /*
+ * No Rubydoc. The method should be internal but can't be changed since
+ * we shipped it with a public visibility
+ */
+ public void run(IRubyElement element) {
+ if (element == null)
+ return;
+
+ // reveal the top most element only
+ IOpenable openable= element.getOpenable();
+ if (openable instanceof IRubyElement)
+ element= (IRubyElement)openable;
+
+ PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
+ view.tryToReveal(element);
+ }
+
+ private static String getDialogTitle() {
+ return ActionMessages.ShowInPackageViewAction_dialog_title;
+ }
+}
Deleted: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java 2007-09-12 17:53:36 UTC (rev 3154)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java 2007-09-12 18:03:19 UTC (rev 3155)
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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.ui.actions;
-
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.PlatformUI;
-import org.rubypeople.rdt.core.IOpenable;
-import org.rubypeople.rdt.core.IRubyElement;
-import org.rubypeople.rdt.core.RubyModelException;
-import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds;
-import org.rubypeople.rdt.internal.ui.RubyPlugin;
-import org.rubypeople.rdt.internal.ui.actions.SelectionConverter;
-import org.rubypeople.rdt.internal.ui.packageview.PackageExplorerPart;
-import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
-/**
- * This action reveals the currently selected Ruby element in the
- * package explorer.
- * <p>
- * The action is applicable to selections containing elements of type
- * <code>IRubyElement</code>.
- *
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- * @since 2.0
- */
-public class ShowInRubyResourcesViewAction extends SelectionDispatchAction {
-
- private RubyEditor fEditor;
-
- /**
- * Creates a new <code>ShowInPackageViewAction</code>. The action requires
- * that the selection provided by the site's selection provider is of type
- * <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
- *
- * @param site the site providing context information for this action
- */
- public ShowInRubyResourcesViewAction(IWorkbenchSite site) {
- super(site);
- setText(ActionMessages.ShowInPackageViewAction_label);
- setDescription(ActionMessages.ShowInPackageViewAction_description);
- setToolTipText(ActionMessages.ShowInPackageViewAction_tooltip);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IRubyHelpContextIds.SHOW_IN_PACKAGEVIEW_ACTION);
- }
-
- /**
- * Note: This constructor is for internal use only. Clients should not call this constructor.
- * @param editor the Ruby editor
- */
- public ShowInRubyResourcesViewAction(RubyEditor editor) {
- this(editor.getEditorSite());
- fEditor= editor;
- setEnabled(SelectionConverter.canOperateOn(fEditor));
- }
-
- /* (non-Javadoc)
- * Method declared on SelectionDispatchAction.
- */
- public void selectionChanged(ITextSelection selection) {
- }
-
- /* (non-Javadoc)
- * Method declared on SelectionDispatchAction.
- */
- public void selectionChanged(IStructuredSelection selection) {
- setEnabled(checkEnabled(selection));
- }
-
- private boolean checkEnabled(IStructuredSelection selection) {
- if (selection.size() != 1)
- return false;
- return selection.getFirstElement() instanceof IRubyElement;
- }
-
- /* (non-Javadoc)
- * Method declared on SelectionDispatchAction.
- */
- public void run(ITextSelection selection) {
- try {
- IRubyElement element= SelectionConverter.getElementAtOffset(fEditor);
- if (element != null)
- run(element);
- } catch (RubyModelException e) {
- RubyPlugin.log(e);
- String message= ActionMessages.ShowInPackageViewAction_error_message;
- ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus());
- }
- }
-
- /* (non-Javadoc)
- * Method declared on SelectionDispatchAction.
- */
- public void run(IStructuredSelection selection) {
- if (!checkEnabled(selection))
- return;
- run((IRubyElement)selection.getFirstElement());
- }
-
- /*
- * No Rubydoc. The method should be internal but can't be changed since
- * we shipped it with a public visibility
- */
- public void run(IRubyElement element) {
- if (element == null)
- return;
-
- // reveal the top most element only
- IOpenable openable= element.getOpenable();
- if (openable instanceof IRubyElement)
- element= (IRubyElement)openable;
-
- PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
- view.tryToReveal(element);
- }
-
- private static String getDialogTitle() {
- return ActionMessages.ShowInPackageViewAction_dialog_title;
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3154
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3154&view=rev
Author: cawilliams
Date: 2007-09-12 10:53:36 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
try to combine constants that refer to same thing, deprecate old version.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
Modified: trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-09-12 17:53:31 UTC (rev 3153)
+++ trunk/org.rubypeople.rdt.debug.ui.tests/src/org/rubypeople/rdt/internal/debug/ui/launcher/TC_RubyApplicationShortcut.java 2007-09-12 17:53:36 UTC (rev 3154)
@@ -30,7 +30,7 @@
import org.rubypeople.rdt.launching.IVMInstallType;
import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.launching.VMStandin;
-import org.rubypeople.rdt.ui.IRubyConstants;
+import org.rubypeople.rdt.ui.RubyUI;
public class TC_RubyApplicationShortcut extends ModifyingResourceTest {
@@ -191,7 +191,7 @@
String fullPath = RdtDebugUiPlugin.getWorkspace().getRoot().getLocation().toOSString() + File.separator + file.getFullPath().toOSString();
Object sourceElement = sourceLocator.getSourceElement(fullPath);
IEditorInput input = sourceLocator.getEditorInput(sourceElement);
- IEditorPart rubyEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, IRubyConstants.EDITOR_ID);
+ IEditorPart rubyEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, RubyUI.ID_RUBY_EDITOR);
shortcut.launch(rubyEditor, ILaunchManager.RUN_MODE);
@@ -218,7 +218,7 @@
Object sourceElement = sourceLocator.getSourceElement(tmpFile.getAbsolutePath());
IEditorInput input = sourceLocator.getEditorInput(sourceElement);
- IEditorPart rubyExternalEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, IRubyConstants.EXTERNAL_FILES_EDITOR_ID);
+ IEditorPart rubyExternalEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, RubyUI.ID_EXTERNAL_EDITOR);
shortcut.launch(rubyExternalEditor, ILaunchManager.RUN_MODE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:53:34
|
Revision: 3152
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3152&view=rev
Author: cawilliams
Date: 2007-09-12 10:53:25 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
try to combine constants that refer to same thing, deprecate old version.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyFileMatcher.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyOutlinePage.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/IRubyConstants.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyFileMatcher.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyFileMatcher.java 2007-09-12 17:46:42 UTC (rev 3151)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyFileMatcher.java 2007-09-12 17:53:25 UTC (rev 3152)
@@ -30,7 +30,7 @@
import org.eclipse.ui.IFileEditorMapping;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.rubypeople.rdt.ui.IRubyConstants;
+import org.rubypeople.rdt.ui.RubyUI;
/**
* RubyViewerFilter uses the Editor mappings for recognising and filtering files
@@ -105,7 +105,7 @@
IEditorDescriptor[] editors = mapping.getEditors();
for (int j = 0; j < editors.length; j++) {
IEditorDescriptor descriptor = editors[j];
- if (descriptor.getId().equals(IRubyConstants.EDITOR_ID)) {
+ if (descriptor.getId().equals(RubyUI.ID_RUBY_EDITOR)) {
// a mapping can also use a filename instead of a suffix
if (mapping.getExtension() != null
&& mapping.getExtension().length() != 0) {
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyOutlinePage.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyOutlinePage.java 2007-09-12 17:46:42 UTC (rev 3151)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyOutlinePage.java 2007-09-12 17:53:25 UTC (rev 3152)
@@ -96,6 +96,7 @@
import org.rubypeople.rdt.ui.IRubyConstants;
import org.rubypeople.rdt.ui.PreferenceConstants;
import org.rubypeople.rdt.ui.RubyElementSorter;
+import org.rubypeople.rdt.ui.RubyUI;
import org.rubypeople.rdt.ui.actions.CustomFiltersActionGroup;
import org.rubypeople.rdt.ui.actions.MemberFilterActionGroup;
import org.rubypeople.rdt.ui.actions.OpenViewActionGroup;
@@ -1161,7 +1162,7 @@
if (key == IShowInTargetList.class) {
return new IShowInTargetList() {
public String[] getShowInTargetIds() {
- return new String[] { IRubyConstants.RUBY_RESOURCES_VIEW_ID };
+ return new String[] { RubyUI.ID_RUBY_EXPLORER };
}
};
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java 2007-09-12 17:46:42 UTC (rev 3151)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java 2007-09-12 17:53:25 UTC (rev 3152)
@@ -593,7 +593,7 @@
if (key == IShowInTargetList.class) {
return new IShowInTargetList() {
public String[] getShowInTargetIds() {
- return new String[] { RubyUI.ID_RUBY_RESOURCE_VIEW, IPageLayout.ID_RES_NAV };
+ return new String[] { RubyUI.ID_RUBY_EXPLORER, IPageLayout.ID_RES_NAV };
}
};
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/IRubyConstants.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/IRubyConstants.java 2007-09-12 17:46:42 UTC (rev 3151)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/IRubyConstants.java 2007-09-12 17:53:25 UTC (rev 3152)
@@ -10,10 +10,18 @@
*/
public interface IRubyConstants {
- public static final String RUBY_RESOURCES_VIEW_ID = RubyUI.ID_RUBY_RESOURCE_VIEW; //$NON-NLS-1$
- public static final String EDITOR_ID = "org.rubypeople.rdt.ui.EditorRubyFile"; //$NON-NLS-1$
- public static final String EXTERNAL_FILES_EDITOR_ID = "org.rubypeople.rdt.ui.ExternalRubyEditor"; //$NON-NLS-1$
+ /**
+ * @deprecated Please use RubyUI.ID_RUBY_EDITOR
+ */
+ public static final String EDITOR_ID = RubyUI.ID_RUBY_EDITOR; //$NON-NLS-1$
+
+ /**
+ * @deprecated Please use RubyUI.ID_EXTERNAL_EDITOR
+ */
+ public static final String EXTERNAL_FILES_EDITOR_ID = RubyUI.ID_EXTERNAL_EDITOR; //$NON-NLS-1$
+
public static final String RI_VIEW_ID = "org.rubypeople.rdt.ui.views.RIView"; //$NON-NLS-1$
+
public static final String ID_NEW_CLASS_WIZARD = "org.rubypeople.rdt.ui.wizards.RubyNewClassWizard"; //$NON-NLS-1$
}
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java 2007-09-12 17:46:42 UTC (rev 3151)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyUI.java 2007-09-12 17:53:25 UTC (rev 3152)
@@ -111,8 +111,6 @@
*/
public static final String ID_PERSPECTIVE= "org.rubypeople.rdt.ui.PerspectiveRuby"; //$NON-NLS-1$
- public static final String ID_RUBY_RESOURCE_VIEW = "org.rubypeople.rdt.ui.ViewRubyResources"; //$NON-NLS-1$
-
/**
* The view part id of the type hierarchy part
* (value <code>"org.rubypeople.rdt.ui.TypeHierarchy"</code>).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:53:34
|
Revision: 3153
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3153&view=rev
Author: cawilliams
Date: 2007-09-12 10:53:31 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
try to combine constants that refer to same thing, deprecate old version.
Modified Paths:
--------------
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerActionDelegate.java
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-09-12 17:53:25 UTC (rev 3152)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/RubySourceLocator.java 2007-09-12 17:53:31 UTC (rev 3153)
@@ -16,7 +16,7 @@
import org.rubypeople.rdt.internal.debug.core.model.RubyStackFrame;
import org.rubypeople.rdt.internal.ui.rubyeditor.ExternalRubyFileEditorInput;
import org.rubypeople.rdt.launching.IRubyLaunchConfigurationConstants;
-import org.rubypeople.rdt.ui.IRubyConstants;
+import org.rubypeople.rdt.ui.RubyUI;
/**
* @author Administrator
@@ -74,7 +74,7 @@
*/
public String getEditorId(IEditorInput input, Object element) {
SourceElement sourceElement = (SourceElement) element ;
- return sourceElement.isExternal() ? IRubyConstants.EXTERNAL_FILES_EDITOR_ID : IRubyConstants.EDITOR_ID ;
+ return sourceElement.isExternal() ? RubyUI.ID_EXTERNAL_EDITOR : RubyUI.ID_RUBY_EDITOR;
}
/**
Modified: trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerActionDelegate.java
===================================================================
--- trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerActionDelegate.java 2007-09-12 17:53:25 UTC (rev 3152)
+++ trunk/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/actions/ManageBreakpointRulerActionDelegate.java 2007-09-12 17:53:31 UTC (rev 3153)
@@ -11,7 +11,7 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.texteditor.AbstractRulerActionDelegate;
import org.eclipse.ui.texteditor.ITextEditor;
-import org.rubypeople.rdt.ui.IRubyConstants;
+import org.rubypeople.rdt.ui.RubyUI;
public class ManageBreakpointRulerActionDelegate extends AbstractRulerActionDelegate
{
@@ -21,7 +21,7 @@
if ( targetEditor != null )
{
String id = targetEditor.getSite().getId();
- if ( !(id.equals( IRubyConstants.EDITOR_ID) || id.equals(IRubyConstants.EXTERNAL_FILES_EDITOR_ID))) {
+ if ( !(id.equals(RubyUI.ID_RUBY_EDITOR) || id.equals(RubyUI.ID_EXTERNAL_EDITOR))) {
targetEditor = null;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:46:43
|
Revision: 3151
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3151&view=rev
Author: cawilliams
Date: 2007-09-12 10:46:42 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchResultPage.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchResultPage.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchResultPage.java 2007-09-12 17:44:25 UTC (rev 3150)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/search/RubySearchResultPage.java 2007-09-12 17:46:42 UTC (rev 3151)
@@ -71,6 +71,7 @@
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.RubyPluginImages;
import org.rubypeople.rdt.internal.ui.dnd.RdtViewerDragAdapter;
+import org.rubypeople.rdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.rubypeople.rdt.internal.ui.search.RubySearchResult.MatchFilterEvent;
import org.rubypeople.rdt.internal.ui.util.ExceptionHandler;
import org.rubypeople.rdt.internal.ui.viewsupport.ProblemTableViewer;
@@ -151,7 +152,7 @@
private FilterAction[] fFilterActions;
private FiltersDialogAction fFilterDialogAction;
- private static final String[] SHOW_IN_TARGETS= new String[] { RubyUI.ID_RUBY_RESOURCE_VIEW, IPageLayout.ID_RES_NAV };
+ private static final String[] SHOW_IN_TARGETS= new String[] { RubyUI.ID_RUBY_EXPLORER, IPageLayout.ID_RES_NAV };
public static final IShowInTargetList SHOW_IN_TARGET_LIST= new IShowInTargetList() {
public String[] getShowInTargetIds() {
return SHOW_IN_TARGETS;
@@ -173,10 +174,10 @@
fFilterActions= new FilterAction[allFilters.length];
for (int i= 0; i < fFilterActions.length; i++) {
fFilterActions[i]= new FilterAction(this, allFilters[i]);
- fFilterActions[i].setId("org.eclipse.jdt.search.filters."+i); //$NON-NLS-1$
+ fFilterActions[i].setId("org.rubypeople.rdt.search.filters."+i); //$NON-NLS-1$
}
fFilterDialogAction= new FiltersDialogAction(this);
- fFilterDialogAction.setId("org.eclipse.jdt.search.filters."+allFilters.length); //$NON-NLS-1$
+ fFilterDialogAction.setId("org.rubypeople.rdt.search.filters."+allFilters.length); //$NON-NLS-1$
RubyPluginImages.setLocalImageDescriptors(fFilterDialogAction, "filter_ps.gif"); //$NON-NLS-1$
}
@@ -311,7 +312,7 @@
int ops= DND.DROP_COPY | DND.DROP_LINK;
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
-// new SelectionTransferDragAdapter(viewer),
+ new SelectionTransferDragAdapter(viewer),
new ResourceTransferDragAdapter(viewer)
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:44:42
|
Revision: 3150
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3150&view=rev
Author: cawilliams
Date: 2007-09-12 10:44:25 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
start removing the Ruby Resources View
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_InternalUi.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_RubyViewerFilter.java
Deleted: trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_RubyViewerFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_RubyViewerFilter.java 2007-09-12 17:44:18 UTC (rev 3149)
+++ trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TC_RubyViewerFilter.java 2007-09-12 17:44:25 UTC (rev 3150)
@@ -1,89 +0,0 @@
-package org.rubypeople.rdt.internal.ui;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.rubypeople.eclipse.testutils.ResourceTools;
-import org.rubypeople.rdt.core.RubyCore;
-import org.rubypeople.rdt.internal.ui.RubyViewerFilter;
-import org.rubypeople.rdt.internal.ui.resourcesview.RubyResourcesView;
-
-public class TC_RubyViewerFilter extends TestCase {
-
- private RubyViewerFilter filter;
-
- public TC_RubyViewerFilter(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- filter = new RubyViewerFilter(new RubyResourcesView());
- }
-
- public void testFilterShowsRubyProjects() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- RubyCore.addRubyNature(project, null);
- assertTrue(filter.select(null, null, project));
- }
-
- public void testFilterShowsNonRubyProjects() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- assertTrue(filter.select(null, null, project));
- }
-
- public void testFilterShowsRBFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.rb");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsRBWFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.rbw");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsCGIFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.cgi");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsRHTMLFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.rhtml");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsYAMLFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.yaml");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsYMLFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.yml");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsRakefiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("Rakefile");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsGemFiles() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFile file = project.getFile("TCRubyViewerFilterFile.gem");
- assertTrue(filter.select(null, null, file));
- }
-
- public void testFilterShowsFolders() throws Exception {
- IProject project = ResourceTools.createProject("TCRubyViewerFilter");
- IFolder folder = project.getFolder("TCRubyViewerFilterFolder");
- assertTrue(filter.select(null, null, folder));
- }
-}
Modified: trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_InternalUi.java
===================================================================
--- trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_InternalUi.java 2007-09-12 17:44:18 UTC (rev 3149)
+++ trunk/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/TS_InternalUi.java 2007-09-12 17:44:25 UTC (rev 3150)
@@ -6,8 +6,7 @@
public class TS_InternalUi {
public static Test suite() {
- TestSuite suite = new TestSuite("org.rubypeople.rdt.internal.ui");
- suite.addTestSuite(TC_RubyViewerFilter.class);
+ TestSuite suite = new TestSuite("org.rubypeople.rdt.internal.ui");
suite.addTestSuite(TC_StackTraceLine.class);
suite.addTestSuite(TC_ResourceAdapterFactory.class);
suite.addTestSuite(TC_RubyFileMatcher.class);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:44:20
|
Revision: 3149
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3149&view=rev
Author: cawilliams
Date: 2007-09-12 10:44:18 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
start removing the Ruby Resources View
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
trunk/org.rubypeople.rdt.ui/plugin.xml
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyViewerFilter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilesOnlyFilterAction.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilterActionGroup.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyResourcesView.java
Modified: trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF 2007-09-12 17:44:18 UTC (rev 3149)
@@ -18,7 +18,6 @@
org.rubypeople.rdt.internal.ui.packageview,
org.rubypeople.rdt.internal.ui.preferences,
org.rubypeople.rdt.internal.ui.preferences.formatter,
- org.rubypeople.rdt.internal.ui.resourcesview,
org.rubypeople.rdt.internal.ui.rubyeditor,
org.rubypeople.rdt.internal.ui.search,
org.rubypeople.rdt.internal.ui.text,
Modified: trunk/org.rubypeople.rdt.ui/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/plugin.xml 2007-09-12 17:44:18 UTC (rev 3149)
@@ -135,7 +135,7 @@
<newWizardShortcut id="org.eclipse.ui.wizards.new.folder"/>
<newWizardShortcut id="org.eclipse.ui.wizards.new.file"/>
<viewShortcut id="org.eclipse.ui.views.ContentOutline"/>
- <viewShortcut id="org.rubypeople.rdt.ui.ViewRubyResources"/>
+ <viewShortcut id="org.rubypeople.rdt.ui.PackageExplorer"/>
<viewShortcut id="org.eclipse.ui.console.ConsoleView"/>
<viewShortcut id="org.eclipse.ui.views.ProblemView"/>
<viewShortcut id="org.eclipse.ui.views.TaskList"/>
@@ -186,7 +186,7 @@
<perspectiveShortcut
id="org.rubypeople.rdt.ui.RubyBrowsingPerspective">
</perspectiveShortcut>
- <showInPart id="org.rubypeople.rdt.ui.ViewRubyResources"/>
+ <showInPart id="org.rubypeople.rdt.ui.PackageExplorer"/>
</perspectiveExtension>
<perspectiveExtension
targetID="org.rubypeople.rdt.ui.RubyBrowsingPerspective">
@@ -385,13 +385,6 @@
id="org.rubypeople.rdt.ui.PackageExplorer">
</view>
<view
- name="%ViewRubyResources.name"
- icon="icons/full/ctool16/ruby.gif"
- category="org.rubypeople.rdt.ui.ruby"
- class="org.rubypeople.rdt.internal.ui.resourcesview.RubyResourcesView"
- id="org.rubypeople.rdt.ui.ViewRubyResources">
- </view>
- <view
name="RI"
icon="icons/full/elcl16/help.gif"
category="org.rubypeople.rdt.ui.ruby"
@@ -967,7 +960,7 @@
id="org.eclipse.search.SearchResultView">
</part>
<part
- id="org.rubypeople.rdt.ui.ViewRubyResources">
+ id="org.rubypeople.rdt.ui.PackageExplorer">
</part>
<part
id="org.rubypeople.rdt.ui.TypeHierarchy">
@@ -1210,7 +1203,7 @@
<actionSetPartAssociation
targetID="org.rubypeople.rdt.ui.SearchActionSet">
<part
- id="org.rubypeople.rdt.ui.ViewRubyResources">
+ id="org.rubypeople.rdt.ui.PackageExplorer">
</part>
<part
id="org.rubypeople.rdt.ui.TypeHierarchy">
Deleted: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyViewerFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyViewerFilter.java 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyViewerFilter.java 2007-09-12 17:44:18 UTC (rev 3149)
@@ -1,59 +0,0 @@
-/*
- * Author: Adam Williams, Markus Barchfeld
- *
- * Copyright (c) 2004 RubyPeople.
- *
- * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. RDT
- * is subject to the "Common Public License (CPL) v 1.0". You may not use RDT
- * except in compliance with the License. For further information see
- * org.rubypeople.rdt/rdt.license.
- */
-package org.rubypeople.rdt.internal.ui;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.ui.IPropertyListener;
-import org.rubypeople.rdt.core.IRubyElement;
-import org.rubypeople.rdt.internal.ui.resourcesview.RubyResourcesView;
-
-/**
- * The filter can be switched on and off using
- * rubyResourcesView.isRubyFilesOnlyFilterActivated
- */
-public class RubyViewerFilter extends ViewerFilter {
-
- private final RubyResourcesView rubyResourcesView;
-
- private IPropertyListener propertyListener = new IPropertyListener() {
-
- public void propertyChanged(Object source, int property) {
- if (property == RubyFileMatcher.PROP_MATCH_CRITERIA) {
- rubyResourcesView.getViewer().refresh();
- }
- }
- };
-
- public RubyViewerFilter(RubyResourcesView rubyResourcesView) {
- this.rubyResourcesView = rubyResourcesView;
- RubyPlugin.getDefault().getRubyFileMatcher().addPropertyChangeListener(propertyListener);
- }
-
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- // FIXME Filter files more dynamically using plugin.xml!
- if (!rubyResourcesView.isRubyFilesOnlyFilterActivated()) { return true; }
- if (element instanceof IFolder) { return true; }
- if (element instanceof IFile) {
- IFile file = (IFile) element;
- return RubyPlugin.getDefault().getRubyFileMatcher().hasRubyEditorAssociation(file);
- }
-
- // the rest e.g. projects
- IAdaptable adaptable = (IAdaptable) element;
- IRubyElement rubyElement = (IRubyElement) adaptable.getAdapter(IRubyElement.class);
- return rubyElement != null;
- }
-
-}
\ No newline at end of file
Deleted: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilesOnlyFilterAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilesOnlyFilterAction.java 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilesOnlyFilterAction.java 2007-09-12 17:44:18 UTC (rev 3149)
@@ -1,37 +0,0 @@
-/*
- * Author: Markus Barchfeld
- *
- * Copyright (c) 2004 RubyPeople.
- *
- * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. RDT
- * is subject to the "Common Public License (CPL) v 1.0". You may not use RDT
- * except in compliance with the License. For further information see
- * org.rubypeople.rdt/rdt.license.
- */
-
-package org.rubypeople.rdt.internal.ui.resourcesview;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.views.navigator.IResourceNavigator;
-import org.eclipse.ui.views.navigator.ResourceNavigatorAction;
-import org.rubypeople.rdt.internal.ui.RubyUIMessages;
-
-public class RubyFilesOnlyFilterAction extends ResourceNavigatorAction {
-
-
- public RubyFilesOnlyFilterAction(IResourceNavigator navigator, boolean sortByType) {
- super(navigator, RubyUIMessages.ToggleMenuRubyFilesOnly);
- this.setToolTipText(RubyUIMessages.ToggleMenuRubyFilesOnly_Tooltip);
- this.setChecked(((RubyResourcesView) this.getNavigator()).isRubyFilesOnlyFilterActivated()) ;
-
- }
-
- public void run() {
- ((RubyResourcesView) this.getNavigator()).setRubyFilesOnlyFilterActivated(this.isChecked());
- Viewer viewer = getViewer();
- viewer.getControl().setRedraw(false);
- viewer.refresh();
- viewer.getControl().setRedraw(true);
- }
-
-}
\ No newline at end of file
Deleted: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilterActionGroup.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilterActionGroup.java 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyFilterActionGroup.java 2007-09-12 17:44:18 UTC (rev 3149)
@@ -1,40 +0,0 @@
-/*
- * Author: Adam Williams, Markus Barchfeld
- *
- * Copyright (c) 2004 RubyPeople.
- *
- * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. RDT
- * is subject to the "Common Public License (CPL) v 1.0". You may not use RDT
- * except in compliance with the License. For further information see
- * org.rubypeople.rdt/rdt.license.
- */
-package org.rubypeople.rdt.internal.ui.resourcesview;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.views.navigator.MainActionGroup;
-import org.eclipse.ui.views.navigator.ResourceNavigator;
-
-public class RubyFilterActionGroup extends MainActionGroup {
-
- private RubyFilesOnlyFilterAction rubyFilesOnlyAction;
-
- public RubyFilterActionGroup(ResourceNavigator navigator) {
- super(navigator);
- }
-
- protected void makeActions() {
- super.makeActions();
- rubyFilesOnlyAction = new RubyFilesOnlyFilterAction(navigator, false);
- }
-
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- IMenuManager menu = actionBars.getMenuManager();
- menu.add(rubyFilesOnlyAction);
- }
-
- public RubyFilesOnlyFilterAction getRubyFilesOnlyAction() {
- return rubyFilesOnlyAction;
- }
-}
\ No newline at end of file
Deleted: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyResourcesView.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyResourcesView.java 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/resourcesview/RubyResourcesView.java 2007-09-12 17:44:18 UTC (rev 3149)
@@ -1,196 +0,0 @@
-/*
- * Author: Markus Barchfeld
- *
- * Copyright (c) 2004 RubyPeople.
- *
- * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. RDT
- * is subject to the "Common Public License (CPL) v 1.0". You may not use RDT
- * except in compliance with the License. For further information see
- * org.rubypeople.rdt/rdt.license.
- */
-
-package org.rubypeople.rdt.internal.ui.resourcesview;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.IShowInTarget;
-import org.eclipse.ui.part.ShowInContext;
-import org.eclipse.ui.views.navigator.ResourceNavigator;
-import org.rubypeople.rdt.core.IRubyElement;
-import org.rubypeople.rdt.internal.ui.RubyPlugin;
-import org.rubypeople.rdt.internal.ui.RubyViewerFilter;
-import org.rubypeople.rdt.internal.ui.rubyeditor.ExternalRubyFileEditorInput;
-import org.rubypeople.rdt.internal.ui.rubyeditor.IRubyScriptEditorInput;
-import org.rubypeople.rdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
-import org.rubypeople.rdt.internal.ui.viewsupport.DecoratingRubyLabelProvider;
-import org.rubypeople.rdt.ui.RubyUI;
-
-public class RubyResourcesView extends ResourceNavigator implements IShowInTarget {
-
- private static String IS_RUBY_FILES_ONLY_MEMENTO_KEY = "isRubyFilesOnlyFilterActivated";
- private boolean isRubyFilesOnlyFilterActivated = false; // default value if
- // there is no
- // memento
-
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- RubyViewerFilter filter = new RubyViewerFilter(this);
- this.getViewer().addFilter(filter);
- }
-
- protected void makeActions() {
- setActionGroup(new RubyFilterActionGroup(this));
- }
-
- protected void restoreRubyFilesOnlyFilterActivated(IMemento memento) {
- Integer isRubyFilesOnlyFilterActivatedMemento = memento.getInteger(RubyResourcesView.IS_RUBY_FILES_ONLY_MEMENTO_KEY);
- if (isRubyFilesOnlyFilterActivatedMemento != null) {
- this.isRubyFilesOnlyFilterActivated = isRubyFilesOnlyFilterActivatedMemento.intValue() == 1;
- }
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- memento.putInteger(RubyResourcesView.IS_RUBY_FILES_ONLY_MEMENTO_KEY, isRubyFilesOnlyFilterActivated ? 1 : 0);
- }
-
- public boolean isRubyFilesOnlyFilterActivated() {
- return isRubyFilesOnlyFilterActivated;
- }
-
- public void setRubyFilesOnlyFilterActivated(boolean isRubyFilesOnlyFilterActivated) {
- this.isRubyFilesOnlyFilterActivated = isRubyFilesOnlyFilterActivated;
- }
-
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
- if (memento != null) {
- this.restoreRubyFilesOnlyFilterActivated(memento);
- }
- }
- protected void editorActivated(IEditorPart editor) {
- if (!isLinkingEnabled()) {
- return;
- }
-
- IEditorInput input = editor.getEditorInput();
- if (input instanceof IFileEditorInput) {
- IFileEditorInput fileInput = (IFileEditorInput) input;
- IFile file = fileInput.getFile();
- // Quick Fix: if Editor is RubyExternal, then file is null
- // TODO: Check if RubyExternalEditor's input should be IFileEditorInput at all
- if (file == null) {
- return ;
- }
- }
- super.editorActivated(editor) ;
- }
-
- public static RubyResourcesView openInActivePerspective() {
- try {
- return (RubyResourcesView)RubyPlugin.getActivePage().showView(RubyUI.ID_RUBY_RESOURCE_VIEW);
- } catch(PartInitException pe) {
- return null;
- }
- }
-
- public boolean tryToReveal(Object element) {
- if (revealElementOrParent(element))
- return true;
- return false;
- }
-
- private boolean revealElementOrParent(Object element) {
- if (revealAndVerify(element))
- return true;
- element= getVisibleParent(element);
- if (element != null) {
- if (revealAndVerify(element))
- return true;
- if (element instanceof IRubyElement) {
- IResource resource= ((IRubyElement)element).getResource();
- if (resource != null) {
- if (revealAndVerify(resource))
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean revealAndVerify(Object element) {
- if (element == null)
- return false;
- selectReveal(new StructuredSelection(element));
- return ! getSite().getSelectionProvider().getSelection().isEmpty();
- }
-
- private Object getVisibleParent(Object object) {
- if (object == null)
- return null;
- if (!(object instanceof IRubyElement))
- return object;
- IRubyElement element2= (IRubyElement) object;
- switch (element2.getElementType()) {
- case IRubyElement.IMPORT_DECLARATION:
- case IRubyElement.IMPORT_CONTAINER:
- case IRubyElement.TYPE:
- case IRubyElement.METHOD:
- case IRubyElement.FIELD:
- // select parent script
- element2= (IRubyElement)element2.getOpenable();
- break;
- case IRubyElement.RUBY_MODEL:
- element2= null;
- break;
- }
- return element2;
- }
-
- public boolean show(ShowInContext context) {
- ISelection selection= context.getSelection();
- if (selection instanceof IStructuredSelection) {
- // fix for 64634 Navigate/Show in/Package Explorer doesn't work
- IStructuredSelection structuredSelection= ((IStructuredSelection) selection);
- if (structuredSelection.size() == 1 && tryToReveal(structuredSelection.getFirstElement()))
- return true;
- }
-
- Object input= context.getInput();
- if (input instanceof IEditorInput) {
- Object elementOfInput= getElementOfInput((IEditorInput)context.getInput());
- return elementOfInput != null && tryToReveal(elementOfInput);
- }
-
- return false;
- }
-
- @Override
- protected void initLabelProvider(TreeViewer viewer) {
- viewer.setLabelProvider(new DecoratingRubyLabelProvider(new AppearanceAwareLabelProvider()));
- }
-
- /**
- * Returns the element contained in the EditorInput
- */
- Object getElementOfInput(IEditorInput input) {
- if (input instanceof IRubyScriptEditorInput)
- return ((IRubyScriptEditorInput)input).getRubyScript();
- else if (input instanceof IFileEditorInput)
- return ((IFileEditorInput)input).getFile();
- else if (input instanceof ExternalRubyFileEditorInput)
- return ((ExternalRubyFileEditorInput)input).getStorage();
- return null;
- }
-}
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java 2007-09-12 17:42:38 UTC (rev 3148)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/actions/ShowInRubyResourcesViewAction.java 2007-09-12 17:44:18 UTC (rev 3149)
@@ -21,7 +21,7 @@
import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
import org.rubypeople.rdt.internal.ui.actions.SelectionConverter;
-import org.rubypeople.rdt.internal.ui.resourcesview.RubyResourcesView;
+import org.rubypeople.rdt.internal.ui.packageview.PackageExplorerPart;
import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor;
/**
* This action reveals the currently selected Ruby element in the
@@ -120,7 +120,7 @@
if (openable instanceof IRubyElement)
element= (IRubyElement)openable;
- RubyResourcesView view= RubyResourcesView.openInActivePerspective();
+ PackageExplorerPart view= PackageExplorerPart.openInActivePerspective();
view.tryToReveal(element);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <caw...@us...> - 2007-09-12 17:42:41
|
Revision: 3148
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3148&view=rev
Author: cawilliams
Date: 2007-09-12 10:42:38 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
add missing icons and translation strings
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.properties
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/RubyCapabilityConfigurationPage.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/icons/full/dlcl16/clear_co.gif
trunk/org.rubypeople.rdt.ui/icons/full/elcl16/clear_co.gif
Added: trunk/org.rubypeople.rdt.ui/icons/full/dlcl16/clear_co.gif
===================================================================
(Binary files differ)
Property changes on: trunk/org.rubypeople.rdt.ui/icons/full/dlcl16/clear_co.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/org.rubypeople.rdt.ui/icons/full/elcl16/clear_co.gif
===================================================================
(Binary files differ)
Property changes on: trunk/org.rubypeople.rdt.ui/icons/full/elcl16/clear_co.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.java 2007-09-12 16:08:13 UTC (rev 3147)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.java 2007-09-12 17:42:38 UTC (rev 3148)
@@ -361,7 +361,7 @@
public static String RubyProjectWizardSecondPage_operation_remove;
public static String RubyCapabilityConfigurationPage_title;
public static String RubyCapabilityConfigurationPage_description;
- public static String RubyCapabilityConfigurationPage_op_desc_java;
+ public static String RubyCapabilityConfigurationPage_op_desc_ruby;
public static String LoadPathDetector_operation_description;
public static String NewTypeWizardPage_SuperClassDialog_message;
public static String NewTypeWizardPage_SuperClassDialog_title;
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.properties 2007-09-12 16:08:13 UTC (rev 3147)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/NewWizardMessages.properties 2007-09-12 17:42:38 UTC (rev 3148)
@@ -1,3 +1,9 @@
+# ------- RubyCapabilityConfigurationPage -------
+
+RubyCapabilityConfigurationPage_title=Ruby Settings
+RubyCapabilityConfigurationPage_description=Define the Ruby build settings.
+RubyCapabilityConfigurationPage_op_desc_ruby=Configuring Ruby project...
+
# ------- NewElementWizard -------
NewElementWizard_op_error_title=New
@@ -602,9 +608,9 @@
NewSourceContainerWorkbookPage_ToolBar_AddSelLibToCP_tooltip=Add to Build Path
NewSourceContainerWorkbookPage_ToolBar_AddSelLibToCP_label=&Add to Build Path
-NewSourceContainerWorkbookPage_ToolBar_AddJarCP_tooltip=Add External Archives to Java Build Path
+NewSourceContainerWorkbookPage_ToolBar_AddJarCP_tooltip=Add External Archives to Ruby Build Path
NewSourceContainerWorkbookPage_ToolBar_AddJarCP_label=Add External Archi&ves...
-NewSourceContainerWorkbookPage_ToolBar_AddLibCP_tooltip=Add Libraries to Java Build Path
+NewSourceContainerWorkbookPage_ToolBar_AddLibCP_tooltip=Add Libraries to Ruby Build Path
NewSourceContainerWorkbookPage_ToolBar_AddLibCP_label=Add &Libraries...
NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_tooltip=Remove from Build Path
NewSourceContainerWorkbookPage_ToolBar_RemoveFromCP_label=&Remove from Build Path
@@ -622,8 +628,8 @@
NewSourceContainerWorkbookPage_ToolBar_CreateSrcFolder_tooltip=Create a new Source Folder for the Project
NewSourceContainerWorkbookPage_ToolBar_Link_tooltip=Link Additional Source to Project
NewSourceContainerWorkbookPage_ToolBar_Link_label=Link &Source...
-NewSourceContainerWorkbookPage_ToolBar_Help_tooltip=Java Build Path Help
-NewSourceContainerWorkbookPage_ToolBar_Help_label=Java Build Path &Help
+NewSourceContainerWorkbookPage_ToolBar_Help_tooltip=Ruby Build Path Help
+NewSourceContainerWorkbookPage_ToolBar_Help_label=Ruby Build Path &Help
NewSourceContainerWorkbookPage_ToolBar_Help_link=/org.eclipse.jdt.doc.user/reference/ref-123b.htm
# ------- NewFolderDialog -------
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/RubyCapabilityConfigurationPage.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/RubyCapabilityConfigurationPage.java 2007-09-12 16:08:13 UTC (rev 3147)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/RubyCapabilityConfigurationPage.java 2007-09-12 17:42:38 UTC (rev 3148)
@@ -239,7 +239,7 @@
}
int nSteps= 6;
- monitor.beginTask(NewWizardMessages.RubyCapabilityConfigurationPage_op_desc_java, nSteps);
+ monitor.beginTask(NewWizardMessages.RubyCapabilityConfigurationPage_op_desc_ruby, nSteps);
try {
IProject project= getRubyProject().getProject();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|