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: Christopher W. <caw...@us...> - 2006-05-19 11:30:36
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24508/src/org/rubypeople/rdt/internal/ui/text Modified Files: PercentSyntaxRule.java Log Message: handle %w and %W shorthand for array of strings (don't mark it as single % case) Index: PercentSyntaxRule.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/PercentSyntaxRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PercentSyntaxRule.java 12 May 2006 21:39:35 -0000 1.1 --- PercentSyntaxRule.java 19 May 2006 11:30:23 -0000 1.2 *************** *** 20,23 **** --- 20,29 ---- case 'Q': // strings return detectToken(scanner, IRubyPartitions.RUBY_STRING); + case 'w': + case 'W': // Array of strings + scanner.unread(); + scanner.unread(); + // FIXME Mark teh individual elements as strings + return Token.UNDEFINED; default: // special case of string (no letter following percent) scanner.unread(); |
|
From: Christopher W. <caw...@us...> - 2006-05-17 11:39:36
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6516/src/org/rubypeople/rdt/internal/core/parser Modified Files: InOrderVisitor.java Log Message: remove @Override tag since we target Java 1.4 Index: InOrderVisitor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/InOrderVisitor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InOrderVisitor.java 17 May 2006 02:41:08 -0000 1.1 --- InOrderVisitor.java 17 May 2006 11:39:32 -0000 1.2 *************** *** 1166,1170 **** } - @Override protected Instruction visitNode(Node iVisited) { // TODO Auto-generated method stub --- 1166,1169 ---- |
|
From: Christopher W. <caw...@us...> - 2006-05-17 11:39:14
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6489/src/org/rubypeople/rdt/internal/core/builder Modified Files: ProblemRequestorMarkerManager.java Log Message: refer to TaskTag, not Task (trying to fix broken build) Index: ProblemRequestorMarkerManager.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/ProblemRequestorMarkerManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProblemRequestorMarkerManager.java 17 May 2006 02:41:07 -0000 1.1 --- ProblemRequestorMarkerManager.java 17 May 2006 11:39:07 -0000 1.2 *************** *** 10,15 **** import org.rubypeople.rdt.core.parser.IProblem; import org.rubypeople.rdt.internal.core.parser.RdtPosition; ! ! import com.sun.jmx.snmp.tasks.Task; public class ProblemRequestorMarkerManager implements IProblemRequestor { --- 10,14 ---- import org.rubypeople.rdt.core.parser.IProblem; import org.rubypeople.rdt.internal.core.parser.RdtPosition; ! import org.rubypeople.rdt.internal.core.parser.TaskTag; public class ProblemRequestorMarkerManager implements IProblemRequestor { *************** *** 28,32 **** public void acceptProblem(IProblem problem) { ! // TODO Bl;ah blah blah // if (!isActive()) return; if (problem.isWarning()) { --- 27,31 ---- public void acceptProblem(IProblem problem) { ! // TODO Use active flag by calling begin and end reporting // if (!isActive()) return; if (problem.isWarning()) { *************** *** 43,52 **** if (problem.isTask()) { List tasks = new ArrayList(); ! Task task = (Task) problem; tasks.add(task); try { markerManager.createTasks(file, tasks); } catch (CoreException e) { - // TODO Auto-generated catch block e.printStackTrace(); } --- 42,50 ---- if (problem.isTask()) { List tasks = new ArrayList(); ! TaskTag task = (TaskTag) problem; tasks.add(task); try { markerManager.createTasks(file, tasks); } catch (CoreException e) { e.printStackTrace(); } *************** *** 64,68 **** public boolean isActive() { - // TODO Auto-generated method stub return active; } --- 62,65 ---- |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:43:41
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25483/src/org/rubypeople/rdt/internal/ui/util Added Files: CoreUtility.java Log Message: expose a new preference page for the Ruby "Lint" like warnings. This is a first cut at it, a lot of the warnings from the pref page aren't hooked up in the analyzer (so they have no effect) --- NEW FILE: CoreUtility.java --- /******************************************************************************* * 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.util; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceDescription; import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.swt.custom.BusyIndicator; import org.osgi.framework.Bundle; import org.rubypeople.rdt.internal.corext.util.Messages; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyUIMessages; public class CoreUtility { /** * Creates a folder and all parent folders if not existing. * Project must exist. * <code> org.eclipse.ui.dialogs.ContainerGenerator</code> is too heavy * (creates a runnable) */ public static void createFolder(IFolder folder, boolean force, boolean local, IProgressMonitor monitor) throws CoreException { if (!folder.exists()) { IContainer parent= folder.getParent(); if (parent instanceof IFolder) { createFolder((IFolder)parent, force, local, null); } folder.create(force, local, monitor); } } /** * Creates an extension. If the extension plugin has not * been loaded a busy cursor will be activated during the duration of * the load. * * @param element the config element defining the extension * @param classAttribute the name of the attribute carrying the class * @return the extension object */ public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException { // If plugin has been loaded create extension. // Otherwise, show busy cursor then create extension. String pluginId = element.getNamespace(); Bundle bundle = Platform.getBundle(pluginId); if (bundle != null && bundle.getState() == Bundle.ACTIVE ) { return element.createExecutableExtension(classAttribute); } else { final Object[] ret = new Object[1]; final CoreException[] exc = new CoreException[1]; BusyIndicator.showWhile(null, new Runnable() { public void run() { try { ret[0] = element.createExecutableExtension(classAttribute); } catch (CoreException e) { exc[0] = e; } } }); if (exc[0] != null) throw exc[0]; else return ret[0]; } } /** * Starts a build in the background. * @param project The project to build or <code>null</code> to build the workspace. */ public static void startBuildInBackground(final IProject project) { getBuildJob(project).schedule(); } private static final class BuildJob extends Job { private final IProject fProject; private BuildJob(String name, IProject project) { super(name); fProject= project; } public boolean isCoveredBy(BuildJob other) { if (other.fProject == null) { return true; } return fProject != null && fProject.equals(other.fProject); } /* (non-Rubydoc) * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) */ protected IStatus run(IProgressMonitor monitor) { synchronized (getClass()) { if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } Job[] buildJobs = Platform.getJobManager().find(ResourcesPlugin.FAMILY_MANUAL_BUILD); for (int i= 0; i < buildJobs.length; i++) { Job curr= buildJobs[i]; if (curr != this && curr instanceof BuildJob) { BuildJob job= (BuildJob) curr; if (job.isCoveredBy(this)) { curr.cancel(); // cancel all other build jobs of our kind } } } } try { if (fProject != null) { monitor.beginTask(Messages.format(RubyUIMessages.CoreUtility_buildproject_taskname, fProject.getName()), 2); fProject.build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor,1)); RubyPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(monitor,1)); } else { monitor.beginTask(RubyUIMessages.CoreUtility_buildall_taskname, 2); RubyPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor, 2)); } } catch (CoreException e) { return e.getStatus(); } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } finally { monitor.done(); } return Status.OK_STATUS; } public boolean belongsTo(Object family) { return ResourcesPlugin.FAMILY_MANUAL_BUILD == family; } } /** * Returns a build job * @param project The project to build or <code>null</code> to build the workspace. */ public static Job getBuildJob(final IProject project) { Job buildJob= new BuildJob(RubyUIMessages.CoreUtility_job_title, project); buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule()); buildJob.setUser(true); return buildJob; } /** * Set the autobuild to the value of the parameter and * return the old one. * * @param state the value to be set for autobuilding. * @return the old value of the autobuild state */ public static boolean enableAutoBuild(boolean state) throws CoreException { IWorkspace workspace= ResourcesPlugin.getWorkspace(); IWorkspaceDescription desc= workspace.getDescription(); boolean isAutoBuilding= desc.isAutoBuilding(); if (isAutoBuilding != state) { desc.setAutoBuilding(state); workspace.setDescription(desc); } return isAutoBuilding; } } |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:43:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25483 Modified Files: plugin.properties plugin.xml Log Message: expose a new preference page for the Ruby "Lint" like warnings. This is a first cut at it, a lot of the warnings from the pref page aren't hooked up in the analyzer (so they have no effect) Index: plugin.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.properties,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** plugin.properties 5 May 2006 21:46:05 -0000 1.35 --- plugin.properties 17 May 2006 02:43:37 -0000 1.36 *************** *** 31,34 **** --- 31,55 ---- appearancePrefName=Appearance + problemSeveritiesPageName=Errors/Warnings + + + preferenceKeywords.general=Ruby resources call type hierarchy refactoring search + preferenceKeywords.appearance=Ruby appearance resources browsing + preferenceKeywords.sortorder=Ruby member sort order appearance + + preferenceKeywords.codestyle=Ruby prefix postfix suffix naming convention project specific comment override getter this annotation exception qualify field parameter + preferenceKeywords.formatter=Ruby profile codestyle project specific comment indentation Rdoc brace white space blank line new control statement wrapping annotation with tab tabulator parenthesis bracket + + preferenceKeywords.codetemplates=Ruby comment code getter setter Rdoc codestyle override constructor file type field method override overriding catch body project specific + preferenceKeywords.severities=Ruby errors warnings ignore compiler options nls externalize string severity severities deprecated static access member serializable serialVersionUID assignment effect finally empty char array catch shadowing package visible interface object method deprecated forbidden discouraged reference unused code unnecessary import imports private cast instanceof local variable parameter thrown exception final type bound generic vararg boxing unboxing autoboxing annotation @Override @Deprecated @SuppressWarnings enum constants switch project specific projectspecific + preferenceKeywords.todo=Ruby case sensitive task tag todo xxx fix fixme compiler project specific projectspecific + preferenceKeywords.rubyeditor=Ruby ruby editor quick assist appearance navigation colors light bulb smart caret positioning highlight matching bracket foreground background + + preferenceKeywords.contentassist=Ruby editor content code assist complete completion insert overwrite single proposal common prefix automatically import fill argument name guess alphabetical hide discouraged reference forbidden auto activation trigger Rdoc camel camelcase + preferenceKeywords.hover=Ruby editor hover sticky annotation roll over key modifier combined variable problem externalized externalize string source + preferenceKeywords.syntaxcoloring=Ruby editor colors semantic coloring highlighting Rdoc html links tags multi line single line comment task tag method invocation static field annotation autoboxing unboxing boxing constant deprecated field keywords local variable operators brackets strings type variable inherited method declaration + preferenceKeywords.templates=Ruby editor templates snippet macros + preferenceKeywords.folding=Ruby editor folding section comment comments header method import inner type + PerspectiveRuby.name=Ruby Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** plugin.xml 5 May 2006 21:46:05 -0000 1.83 --- plugin.xml 17 May 2006 02:43:37 -0000 1.84 *************** *** 276,280 **** --- 276,339 ---- </filter> </page> + <page + objectClass="org.eclipse.core.resources.IProject" + name="%problemSeveritiesPageName" + class="org.rubypeople.rdt.internal.ui.preferences.ProblemSeveritiesPreferencePage" + category="org.rubypeople.rdt.ui.propertyPages.CompliancePreferencePage" + id="org.rubypeople.rdt.ui.propertyPages.ProblemSeveritiesPreferencePage"> + <filter + name="nature" + value="org.rubypeople.rdt.core.rubynature"> + </filter> + <keywordReference id="org.rubypeople.rdt.ui.severities"/> + </page> </extension> + + <extension + point="org.eclipse.ui.keywords"> + <keyword + label="%preferenceKeywords.general" + id="org.rubypeople.rdt.ui.general"/> + <keyword + label="%preferenceKeywords.appearance" + id="org.rubypeople.rdt.ui.appearance"/> + <keyword + label="%preferenceKeywords.sortorder" + id="org.rubypeople.rdt.ui.sortorder"/> + <keyword + label="%preferenceKeywords.codestyle" + id="org.rubypeople.rdt.ui.codestyle"/> + <keyword + label="%preferenceKeywords.codetemplates" + id="org.rubypeople.rdt.ui.codetemplates"/> + <keyword + label="%preferenceKeywords.formatter" + id="org.rubypeople.rdt.ui.formatter"/> + <keyword + label="%preferenceKeywords.severities" + id="org.rubypeople.rdt.ui.severities"/> + <keyword + label="%preferenceKeywords.todo" + id="org.rubypeople.rdt.ui.todo"/> + <keyword + label="%preferenceKeywords.rubyeditor" + id="org.rubypeople.rdt.ui.rubyeditor"/> + <keyword + label="%preferenceKeywords.contentassist" + id="org.rubypeople.rdt.ui.contentassist"/> + <keyword + label="%preferenceKeywords.hover" + id="org.rubypeople.rdt.ui.hover"/> + <keyword + label="%preferenceKeywords.syntaxcoloring" + id="org.rubypeople.rdt.ui.syntaxcoloring"/> + <keyword + label="%preferenceKeywords.templates" + id="org.rubypeople.rdt.ui.templates"/> + <keyword + label="%preferenceKeywords.folding" + id="org.rubypeople.rdt.ui.folding"/> + </extension> + <extension point="org.eclipse.ui.views"> <category |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:43:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25483/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.java RubyUIMessages.properties Log Message: expose a new preference page for the Ruby "Lint" like warnings. This is a first cut at it, a lot of the warnings from the pref page aren't hooked up in the analyzer (so they have no effect) Index: RubyUIMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubyUIMessages.java 30 Mar 2006 02:57:27 -0000 1.4 --- RubyUIMessages.java 17 May 2006 02:43:37 -0000 1.5 *************** *** 23,26 **** --- 23,29 ---- public static String RubyImageLabelprovider_assert_wrongImage; + public static String CoreUtility_buildproject_taskname; + public static String CoreUtility_buildall_taskname; + public static String CoreUtility_job_title; private RubyUIMessages() { Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RubyUIMessages.properties 12 Apr 2006 21:26:25 -0000 1.15 --- RubyUIMessages.properties 17 May 2006 02:43:37 -0000 1.16 *************** *** 147,148 **** --- 147,152 ---- ToggleComment.error.message=An error occurred while toggling comments. + + CoreUtility_job_title=Rebuilding + CoreUtility_buildall_taskname=Build all... + CoreUtility_buildproject_taskname=Build project ''{0}''... |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:43:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25483/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: PreferencesMessages.java TodoTaskConfigurationBlock.java TodoTaskPreferencePage.java PreferencesMessages.properties OptionsConfigurationBlock.java Added Files: ProblemSeveritiesPreferencePage.java ProblemSeveritiesConfigurationBlock.java Log Message: expose a new preference page for the Ruby "Lint" like warnings. This is a first cut at it, a lot of the warnings from the pref page aren't hooked up in the analyzer (so they have no effect) Index: PreferencesMessages.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PreferencesMessages.java 5 May 2006 21:44:59 -0000 1.8 --- PreferencesMessages.java 17 May 2006 02:43:37 -0000 1.9 *************** *** 119,122 **** --- 119,141 ---- public static String RubyEditorPreferencePage_closeBrackets; public static String RubyEditorPreferencePage_closeBraces; + public static String ProblemSeveritiesPreferencePage_title; + public static String ProblemSeveritiesConfigurationBlock_needsbuild_title; + public static String ProblemSeveritiesConfigurationBlock_needsfullbuild_message; + public static String ProblemSeveritiesConfigurationBlock_needsprojectbuild_message; + public static String ProblemSeveritiesConfigurationBlock_error; + public static String ProblemSeveritiesConfigurationBlock_warning; + public static String ProblemSeveritiesConfigurationBlock_ignore; + public static String ProblemSeveritiesConfigurationBlock_common_description; + public static String ProblemSeveritiesConfigurationBlock_section_unnecessary_code; + public static String ProblemSeveritiesConfigurationBlock_section_potential_programming_problems; + public static String ProblemSeveritiesConfigurationBlock_pb_ensure_block_not_completing_label; + public static String ProblemSeveritiesConfigurationBlock_pb_empty_statement_label; + public static String ProblemSeveritiesConfigurationBlock_pb_hidden_rescueblock_label; + public static String ProblemSeveritiesConfigurationBlock_pb_fall_through_case; + public static String ProblemSeveritiesConfigurationBlock_pb_null_reference; + public static String ProblemSeveritiesConfigurationBlock_pb_unused_local_label; + public static String ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label; + public static String ProblemSeveritiesConfigurationBlock_pb_unused_private_label; + public static String ProblemSeveritiesConfigurationBlock_pb_unnecessary_else_label; public static String RubyEditorPreferencePage_background_color; Index: PreferencesMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PreferencesMessages.properties 5 May 2006 21:44:59 -0000 1.12 --- PreferencesMessages.properties 17 May 2006 02:43:37 -0000 1.13 *************** *** 133,134 **** --- 133,159 ---- SmartTypingConfigurationBlock_annotationReporting_link=Also see the <a href="org.eclipse.ui.editors.preferencePages.Spelling">spell checking</a> preferences. + + ProblemSeveritiesPreferencePage_title=Problem Severities + + ProblemSeveritiesConfigurationBlock_needsbuild_title=Error/Warning Settings Changed + ProblemSeveritiesConfigurationBlock_needsfullbuild_message=The Error/Warning settings have changed. A full rebuild is required for changes to take effect. Do the full build now? + ProblemSeveritiesConfigurationBlock_needsprojectbuild_message=The Error/Warning settings have changed. A rebuild of the project is required for changes to take effect. Build the project now? + + ProblemSeveritiesConfigurationBlock_error=Error + ProblemSeveritiesConfigurationBlock_warning=Warning + ProblemSeveritiesConfigurationBlock_ignore=Ignore + + ProblemSeveritiesConfigurationBlock_common_description=Select the severity level for the following Ruby compiler problems: + + ProblemSeveritiesConfigurationBlock_section_potential_programming_problems=&Potential programming problems + ProblemSeveritiesConfigurationBlock_section_unnecessary_code=&Unnecessary code + + ProblemSeveritiesConfigurationBlock_pb_ensure_block_not_completing_label='&ensure' does not complete normally: + ProblemSeveritiesConfigurationBlock_pb_empty_statement_label=Empty statement: + ProblemSeveritiesConfigurationBlock_pb_hidden_rescueblock_label=Hidden rescue bloc&k: + ProblemSeveritiesConfigurationBlock_pb_fall_through_case='case' fall-through: + ProblemSeveritiesConfigurationBlock_pb_null_reference=Null reference: + ProblemSeveritiesConfigurationBlock_pb_unused_local_label=&Local variable is never read: + ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label=Parameter is never read: + ProblemSeveritiesConfigurationBlock_pb_unused_private_label=Unused local or private member: + ProblemSeveritiesConfigurationBlock_pb_unnecessary_else_label=Unnecessary else statement: Index: TodoTaskPreferencePage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TodoTaskPreferencePage.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TodoTaskPreferencePage.java 10 Feb 2006 19:52:26 -0000 1.3 --- TodoTaskPreferencePage.java 17 May 2006 02:43:37 -0000 1.4 *************** *** 1,150 **** ! /******************************************************************************* ! * Copyright (c) 2000, 2004 IBM Corporation and others. ! * All rights reserved. This program and the accompanying materials ! * are made available under the terms of the Common Public License v1.0 ! * which accompanies this distribution, and is available at ! * http://www.eclipse.org/legal/cpl-v10.html ! * ! * Contributors: ! * IBM Corporation - initial API and implementation ! *******************************************************************************/ ! package org.rubypeople.rdt.internal.ui.preferences; ! ! import org.eclipse.core.resources.IProject; ! import org.eclipse.core.runtime.IAdaptable; ! import org.eclipse.swt.widgets.Composite; ! import org.eclipse.swt.widgets.Control; ! import org.eclipse.ui.help.WorkbenchHelp; ! import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; ! import org.rubypeople.rdt.internal.ui.RubyPlugin; ! ! /* ! * The page to configure the task tags ! */ ! public class TodoTaskPreferencePage extends PropertyAndPreferencePage { ! ! public static final String PREF_ID = "org.rubypeople.rdt.ui.preferences.TodoTaskPreferencePage"; //$NON-NLS-1$ ! public static final String PROP_ID = "org.rubypeople.rdt.ui.propertyPages.TodoTaskPreferencePage"; //$NON-NLS-1$ ! ! private TodoTaskConfigurationBlock fConfigurationBlock; ! ! public TodoTaskPreferencePage() { ! setPreferenceStore(RubyPlugin.getDefault().getPreferenceStore()); ! setDescription(PreferencesMessages.TodoTaskPreferencePage_description); ! ! // only used when page is shown programatically ! setTitle(PreferencesMessages.TodoTaskPreferencePage_title); ! } ! ! /* ! * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) ! */ ! public void createControl(Composite parent) { ! fConfigurationBlock = new TodoTaskConfigurationBlock(getNewStatusChangedListener(), ! getProject()); ! ! super.createControl(parent); ! if (isProjectPreferencePage()) { ! WorkbenchHelp.setHelp(getControl(), IRubyHelpContextIds.TODOTASK_PROPERTY_PAGE); ! } else { ! WorkbenchHelp.setHelp(getControl(), IRubyHelpContextIds.TODOTASK_PREFERENCE_PAGE); ! } ! } ! ! /* ! * (non-Rubydoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID() ! */ ! protected String getPreferencePageID() { ! return PREF_ID; ! } ! ! /* ! * (non-Rubydoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID() ! */ ! protected String getPropertyPageID() { ! return PROP_ID; ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#createPreferenceContent(org.eclipse.swt.widgets.Composite) ! */ ! protected Control createPreferenceContent(Composite composite) { ! return fConfigurationBlock.createContents(composite); ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#hasProjectSpecificOptions() ! */ ! protected boolean hasProjectSpecificOptions(IProject project) { ! return fConfigurationBlock.hasProjectSpecificOptions(); ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#openWorkspacePreferences() ! */ ! protected void openWorkspacePreferences() { ! TodoTaskPreferencePage page = new TodoTaskPreferencePage(); ! PreferencePageSupport.showPreferencePage(getShell(), PREF_ID, page); ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#enablePreferenceContent(boolean) ! */ ! protected void enablePreferenceContent(boolean enable) { ! fConfigurationBlock.setEnabled(enable); // override default behaviour ! } ! ! /* ! * @see org.eclipse.jface.preference.IPreferencePage#performDefaults() ! */ ! protected void performDefaults() { ! super.performDefaults(); ! if (fConfigurationBlock != null) { ! fConfigurationBlock.performDefaults(); ! } ! } ! ! /* ! * @see org.eclipse.jface.preference.IPreferencePage#performOk() ! */ ! public boolean performOk() { ! boolean enabled = !isProjectPreferencePage() || useProjectSettings(); ! if (fConfigurationBlock != null && !fConfigurationBlock.performOk(enabled)) { return false; } ! return super.performOk(); ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.dialogs.DialogPage#dispose() ! */ ! public void dispose() { ! if (fConfigurationBlock != null) { ! fConfigurationBlock.dispose(); ! } ! super.dispose(); ! } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#setElement(org.eclipse.core.runtime.IAdaptable) ! */ ! public void setElement(IAdaptable element) { ! super.setElement(element); ! setDescription(null); // no description for property page ! } ! ! } --- 1,143 ---- ! /******************************************************************************* ! * 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.preferences; ! ! import org.eclipse.core.resources.IProject; ! import org.eclipse.core.runtime.IAdaptable; ! import org.eclipse.swt.widgets.Composite; ! import org.eclipse.swt.widgets.Control; ! import org.eclipse.ui.PlatformUI; ! import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; ! import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; ! import org.rubypeople.rdt.internal.ui.RubyPlugin; ! ! /* ! * The page to configure the task tags ! */ ! public class TodoTaskPreferencePage extends PropertyAndPreferencePage { ! ! public static final String PREF_ID= "org.rubypeople.rdt.ui.preferences.TodoTaskPreferencePage"; //$NON-NLS-1$ ! public static final String PROP_ID= "org.rubypeople.rdt.ui.propertyPages.TodoTaskPreferencePage"; //$NON-NLS-1$ ! ! private TodoTaskConfigurationBlock fConfigurationBlock; ! ! public TodoTaskPreferencePage() { ! setPreferenceStore(RubyPlugin.getDefault().getPreferenceStore()); ! setDescription(PreferencesMessages.TodoTaskPreferencePage_description); ! ! // only used when page is shown programatically ! setTitle(PreferencesMessages.TodoTaskPreferencePage_title); ! } ! ! /* ! * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) ! */ ! public void createControl(Composite parent) { ! IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); ! fConfigurationBlock= new TodoTaskConfigurationBlock(getNewStatusChangedListener(), getProject(), container); ! ! super.createControl(parent); ! ! if (isProjectPreferencePage()) { ! PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IRubyHelpContextIds.TODOTASK_PROPERTY_PAGE); ! } else { ! PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IRubyHelpContextIds.TODOTASK_PREFERENCE_PAGE); ! } ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#createPreferenceContent(org.eclipse.swt.widgets.Composite) ! */ ! protected Control createPreferenceContent(Composite composite) { ! return fConfigurationBlock.createContents(composite); ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#hasProjectSpecificOptions(org.eclipse.core.resources.IProject) ! */ ! protected boolean hasProjectSpecificOptions(IProject project) { ! return fConfigurationBlock.hasProjectSpecificOptions(project); ! } ! ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID() ! */ ! protected String getPreferencePageID() { ! return PREF_ID; ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID() ! */ ! protected String getPropertyPageID() { ! return PROP_ID; ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#enableProjectSpecificSettings(boolean) ! */ ! protected void enableProjectSpecificSettings(boolean useProjectSpecificSettings) { ! super.enableProjectSpecificSettings(useProjectSpecificSettings); ! if (fConfigurationBlock != null) { ! fConfigurationBlock.useProjectSpecificSettings(useProjectSpecificSettings); ! } ! } ! ! /* ! * @see org.eclipse.jface.preference.IPreferencePage#performDefaults() ! */ ! protected void performDefaults() { ! super.performDefaults(); ! if (fConfigurationBlock != null) { ! fConfigurationBlock.performDefaults(); ! } ! } ! ! /* ! * @see org.eclipse.jface.preference.IPreferencePage#performOk() ! */ ! public boolean performOk() { ! if (fConfigurationBlock != null && !fConfigurationBlock.performOk()) { ! return false; ! } ! return super.performOk(); ! } ! ! /* ! * @see org.eclipse.jface.preference.IPreferencePage#performApply() ! */ ! public void performApply() { ! if (fConfigurationBlock != null) { ! fConfigurationBlock.performApply(); ! } ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jface.dialogs.DialogPage#dispose() ! */ ! public void dispose() { ! if (fConfigurationBlock != null) { ! fConfigurationBlock.dispose(); ! } ! super.dispose(); ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#setElement(org.eclipse.core.runtime.IAdaptable) ! */ ! public void setElement(IAdaptable element) { ! super.setElement(element); ! setDescription(null); // no description for property page ! } ! ! ! } --- NEW FILE: ProblemSeveritiesConfigurationBlock.java --- /******************************************************************************* * Copyright (c) 2000, 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.ui.preferences; import org.eclipse.core.resources.IProject; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.forms.widgets.ExpandableComposite; import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; import org.rubypeople.rdt.internal.ui.util.PixelConverter; import org.rubypeople.rdt.internal.ui.wizards.IStatusChangeListener; /** */ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlock { private static final String SETTINGS_SECTION_NAME= null; //"ProblemSeveritiesConfigurationBlock"; // Preference store keys, see RubyCore.getOptions private static final Key PREF_PB_ENSURE_BLOCK_NOT_COMPLETING = getJDTCoreKey(RubyCore.COMPILER_PB_ENSURE_BLOCK_NOT_COMPLETING); private static final Key PREF_PB_EMPTY_STATEMENT = getJDTCoreKey(RubyCore.COMPILER_PB_EMPTY_STATEMENT); private static final Key PREF_PB_HIDDEN_RESCUE_BLOCK = getJDTCoreKey(RubyCore.COMPILER_PB_HIDDEN_RESCUE_BLOCK); private static final Key PREF_PB_FALLTHROUGH_CASE = getJDTCoreKey(RubyCore.COMPILER_PB_FALLTHROUGH_CASE); private static final Key PREF_PB_NULL_REFERENCE = getJDTCoreKey(RubyCore.COMPILER_PB_NULL_REFERENCE); private static final Key PREF_PB_UNUSED_LOCAL = getJDTCoreKey(RubyCore.COMPILER_PB_UNUSED_LOCAL); private static final Key PREF_PB_UNUSED_PARAMETER = getJDTCoreKey(RubyCore.COMPILER_PB_UNUSED_PARAMETER); private static final Key PREF_PB_UNUSED_PRIVATE = getJDTCoreKey(RubyCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER); private static final Key PREF_PB_UNNECESSARY_ELSE = getJDTCoreKey(RubyCore.COMPILER_PB_UNNECESSARY_ELSE); // values private static final String ERROR= RubyCore.ERROR; private static final String WARNING= RubyCore.WARNING; private static final String IGNORE= RubyCore.IGNORE; private static final String ENABLED= RubyCore.ENABLED; private static final String DISABLED= RubyCore.DISABLED; private PixelConverter fPixelConverter; public ProblemSeveritiesConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, getKeys(), container); } private static Key[] getKeys() { return new Key[] { PREF_PB_ENSURE_BLOCK_NOT_COMPLETING, PREF_PB_EMPTY_STATEMENT, PREF_PB_HIDDEN_RESCUE_BLOCK, PREF_PB_FALLTHROUGH_CASE, PREF_PB_NULL_REFERENCE, PREF_PB_UNUSED_LOCAL, PREF_PB_UNUSED_PARAMETER, PREF_PB_UNUSED_PRIVATE, PREF_PB_UNNECESSARY_ELSE }; } /* * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite) */ protected Control createContents(Composite parent) { fPixelConverter= new PixelConverter(parent); setShell(parent.getShell()); Composite mainComp= new Composite(parent, SWT.NONE); mainComp.setFont(parent.getFont()); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; mainComp.setLayout(layout); Composite commonComposite= createStyleTabContent(mainComp); GridData gridData= new GridData(GridData.FILL, GridData.FILL, true, true); gridData.heightHint= fPixelConverter.convertHeightInCharsToPixels(20); commonComposite.setLayoutData(gridData); validateSettings(null, null, null); return mainComp; } private Composite createStyleTabContent(Composite folder) { String[] errorWarningIgnore= new String[] { ERROR, WARNING, IGNORE }; String[] errorWarningIgnoreLabels= new String[] { PreferencesMessages.ProblemSeveritiesConfigurationBlock_error, PreferencesMessages.ProblemSeveritiesConfigurationBlock_warning, PreferencesMessages.ProblemSeveritiesConfigurationBlock_ignore }; String[] enabledDisabled= new String[] { ENABLED, DISABLED }; int nColumns= 3; final ScrolledPageContent sc1 = new ScrolledPageContent(folder); Composite composite= sc1.getBody(); GridLayout layout= new GridLayout(nColumns, false); layout.marginHeight= 0; layout.marginWidth= 0; composite.setLayout(layout); Label description= new Label(composite, SWT.LEFT | SWT.WRAP); description.setFont(description.getFont()); description.setText(PreferencesMessages.ProblemSeveritiesConfigurationBlock_common_description); description.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, nColumns - 1, 1)); int indentStep= fPixelConverter.convertWidthInCharsToPixels(1); int defaultIndent= indentStep * 0; int extraIndent= indentStep * 2; String label; ExpandableComposite excomposite; Composite inner; // --- potential_programming_problems label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_section_potential_programming_problems; excomposite= createStyleSection(composite, label, nColumns); inner= new Composite(excomposite, SWT.NONE); inner.setFont(composite.getFont()); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_ensure_block_not_completing_label; addComboBox(inner, label, PREF_PB_ENSURE_BLOCK_NOT_COMPLETING, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_empty_statement_label; addComboBox(inner, label, PREF_PB_EMPTY_STATEMENT, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_hidden_rescueblock_label; addComboBox(inner, label, PREF_PB_HIDDEN_RESCUE_BLOCK, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_fall_through_case; addComboBox(inner, label, PREF_PB_FALLTHROUGH_CASE, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_null_reference; addComboBox(inner, label, PREF_PB_NULL_REFERENCE, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); // --- unnecessary_code label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_section_unnecessary_code; excomposite= createStyleSection(composite, label, nColumns); inner= new Composite(excomposite, SWT.NONE); inner.setFont(composite.getFont()); inner.setLayout(new GridLayout(nColumns, false)); excomposite.setClient(inner); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_local_label; addComboBox(inner, label, PREF_PB_UNUSED_LOCAL, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label; addComboBox(inner, label, PREF_PB_UNUSED_PARAMETER, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_private_label; addComboBox(inner, label, PREF_PB_UNUSED_PRIVATE, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unnecessary_else_label; addComboBox(inner, label, PREF_PB_UNNECESSARY_ELSE, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent); IDialogSettings section= RubyPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME); restoreSectionExpansionStates(section); return sc1; } /* (non-javadoc) * Update fields and validate. * @param changedKey Key that changed, or null, if all changed. */ protected void validateSettings(Key changedKey, String oldValue, String newValue) { if (!areSettingsEnabled()) { return; } if (changedKey != null) { return; } else { updateEnableStates(); } fContext.statusChanged(new StatusInfo()); } private void updateEnableStates() { // TODO Handle enabling/disabling checkboxes as prefs change } protected String[] getFullBuildDialogStrings(boolean workspaceSettings) { String title= PreferencesMessages.ProblemSeveritiesConfigurationBlock_needsbuild_title; String message; if (workspaceSettings) { message= PreferencesMessages.ProblemSeveritiesConfigurationBlock_needsfullbuild_message; } else { message= PreferencesMessages.ProblemSeveritiesConfigurationBlock_needsprojectbuild_message; } return new String[] { title, message }; } /* (non-Rubydoc) * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#dispose() */ public void dispose() { IDialogSettings section= RubyPlugin.getDefault().getDialogSettings().addNewSection(SETTINGS_SECTION_NAME); storeSectionExpansionStates(section); super.dispose(); } } Index: TodoTaskConfigurationBlock.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TodoTaskConfigurationBlock.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TodoTaskConfigurationBlock.java 13 Apr 2006 23:00:38 -0000 1.4 --- TodoTaskConfigurationBlock.java 17 May 2006 02:43:37 -0000 1.5 *************** *** 1,363 **** ! /******************************************************************************* ! * Copyright (c) 2000, 2004 IBM Corporation and others. ! * All rights reserved. This program and the accompanying materials ! * are made available under the terms of the Common Public License v1.0 ! * which accompanies this distribution, and is available at ! * http://www.eclipse.org/legal/cpl-v10.html ! * ! * Contributors: ! * IBM Corporation - initial API and implementation ! *******************************************************************************/ ! package org.rubypeople.rdt.internal.ui.preferences; ! ! import java.util.ArrayList; ! import java.util.List; ! ! import org.eclipse.core.resources.IProject; ! import org.eclipse.core.runtime.IStatus; ! import org.eclipse.jface.resource.JFaceResources; ! import org.eclipse.jface.viewers.IFontProvider; ! import org.eclipse.jface.viewers.ITableLabelProvider; ! import org.eclipse.jface.viewers.LabelProvider; ! import org.eclipse.jface.viewers.Viewer; ! import org.eclipse.jface.viewers.ViewerSorter; ! import org.eclipse.jface.window.Window; ! import org.eclipse.swt.SWT; ! import org.eclipse.swt.graphics.Font; ! import org.eclipse.swt.graphics.Image; ! import org.eclipse.swt.layout.GridData; ! import org.eclipse.swt.layout.GridLayout; ! import org.eclipse.swt.widgets.Composite; ! import org.eclipse.swt.widgets.Control; ! import org.rubypeople.rdt.core.RubyCore; ! import org.rubypeople.rdt.internal.corext.util.Messages; ! import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; ! import org.rubypeople.rdt.internal.ui.wizards.IStatusChangeListener; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.DialogField; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IDialogFieldListener; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IListAdapter; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.ListDialogField; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; ! ! /** ! */ ! public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock { ! ! private static final Key PREF_COMPILER_TASK_TAGS= getJDTCoreKey(RubyCore.COMPILER_TASK_TAGS); ! private static final Key PREF_COMPILER_TASK_PRIORITIES= getJDTCoreKey(RubyCore.COMPILER_TASK_PRIORITIES); ! ! private static final Key PREF_COMPILER_TASK_CASE_SENSITIVE= getJDTCoreKey(RubyCore.COMPILER_TASK_CASE_SENSITIVE); ! ! private static final String PRIORITY_HIGH= RubyCore.COMPILER_TASK_PRIORITY_HIGH; ! private static final String PRIORITY_NORMAL= RubyCore.COMPILER_TASK_PRIORITY_NORMAL; ! private static final String PRIORITY_LOW= RubyCore.COMPILER_TASK_PRIORITY_LOW; ! ! private static final String ENABLED= RubyCore.ENABLED; ! private static final String DISABLED= RubyCore.DISABLED; ! ! public static class TodoTask { ! public String name; ! public String priority; ! } ! ! private class TodoTaskLabelProvider extends LabelProvider implements ITableLabelProvider, IFontProvider { ! ! public TodoTaskLabelProvider() { ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object) ! */ ! public Image getImage(Object element) { ! return null; // JavaPluginImages.get(JavaPluginImages.IMG_OBJS_REFACTORING_INFO); ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) ! */ ! public String getText(Object element) { ! return getColumnText(element, 0); ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) ! */ ! public Image getColumnImage(Object element, int columnIndex) { ! return null; ! } ! /* (non-Javadoc) ! * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) ! */ ! public String getColumnText(Object element, int columnIndex) { ! TodoTask task= (TodoTask) element; ! if (columnIndex == 0) { ! String name= task.name; ! if (isDefaultTask(task)) { ! name=Messages.format(PreferencesMessages.TodoTaskConfigurationBlock_tasks_default, name); ! } ! return name; ! } ! if (PRIORITY_HIGH.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_high_priority; ! } else if (PRIORITY_NORMAL.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_normal_priority; ! } else if (PRIORITY_LOW.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_low_priority; ! } ! return ""; //$NON-NLS-1$ ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object) ! */ ! public Font getFont(Object element) { ! if (isDefaultTask((TodoTask) element)) { ! return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); ! } ! return null; ! } ! } ! ! private static class TodoTaskSorter extends ViewerSorter { ! public int compare(Viewer viewer, Object e1, Object e2) { ! return collator.compare(((TodoTask) e1).name, ((TodoTask) e2).name); ! } ! } ! ! private static final int IDX_ADD= 0; ! private static final int IDX_EDIT= 1; ! private static final int IDX_REMOVE= 2; ! private static final int IDX_DEFAULT= 4; ! ! private IStatus fTaskTagsStatus; ! private ListDialogField fTodoTasksList; ! private SelectionButtonDialogField fCaseSensitiveCheckBox; ! ! ! public TodoTaskConfigurationBlock(IStatusChangeListener context, IProject project) { ! super(context, project, getKeys()); ! ! TaskTagAdapter adapter= new TaskTagAdapter(); ! String[] buttons= new String[] { ! /* 0 */ PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_add_button, ! /* 1 */ PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_edit_button, ! /* 2 */ PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_remove_button, ! null, ! /* 4 */ PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_setdefault_button ! }; ! fTodoTasksList= new ListDialogField(adapter, buttons, new TodoTaskLabelProvider()); ! fTodoTasksList.setDialogFieldListener(adapter); ! fTodoTasksList.setRemoveButtonIndex(IDX_REMOVE); ! ! String[] columnsHeaders= new String[] { ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_name_column, ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_priority_column ! }; ! ! fTodoTasksList.setTableColumns(new ListDialogField.ColumnsDescription(columnsHeaders, true)); ! fTodoTasksList.setViewerSorter(new TodoTaskSorter()); ! ! ! fCaseSensitiveCheckBox= new SelectionButtonDialogField(SWT.CHECK); ! fCaseSensitiveCheckBox.setLabelText(PreferencesMessages.TodoTaskConfigurationBlock_casesensitive_label); ! ! unpackTodoTasks(); ! if (fTodoTasksList.getSize() > 0) { ! fTodoTasksList.selectFirstElement(); ! } else { ! fTodoTasksList.enableButton(IDX_EDIT, false); ! fTodoTasksList.enableButton(IDX_DEFAULT, false); ! } ! ! fTaskTagsStatus= new StatusInfo(); ! } ! ! public void setEnabled(boolean isEnabled) { ! fTodoTasksList.setEnabled(isEnabled); ! fCaseSensitiveCheckBox.setEnabled(isEnabled); ! } ! ! final boolean isDefaultTask(TodoTask task) { ! return fTodoTasksList.getIndexOfElement(task) == 0; ! } ! ! private void setToDefaultTask(TodoTask task) { ! List elements= fTodoTasksList.getElements(); ! elements.remove(task); ! elements.add(0, task); ! fTodoTasksList.setElements(elements); ! fTodoTasksList.enableButton(IDX_DEFAULT, false); ! } ! ! private static Key[] getKeys() { ! return new Key[] { ! PREF_COMPILER_TASK_TAGS, PREF_COMPILER_TASK_PRIORITIES, PREF_COMPILER_TASK_CASE_SENSITIVE ! }; ! } ! ! public class TaskTagAdapter implements IListAdapter, IDialogFieldListener { ! ! private boolean canEdit(List selectedElements) { ! return selectedElements.size() == 1; ! } ! ! private boolean canSetToDefault(List selectedElements) { ! return selectedElements.size() == 1 && !isDefaultTask((TodoTask) selectedElements.get(0)); ! } ! ! public void customButtonPressed(ListDialogField field, int index) { ! doTodoButtonPressed(index); ! } ! ! public void selectionChanged(ListDialogField field) { ! List selectedElements= field.getSelectedElements(); ! field.enableButton(IDX_EDIT, canEdit(selectedElements)); ! field.enableButton(IDX_DEFAULT, canSetToDefault(selectedElements)); ! } ! ! public void doubleClicked(ListDialogField field) { ! if (canEdit(field.getSelectedElements())) { ! doTodoButtonPressed(IDX_EDIT); ! } ! } ! ! public void dialogFieldChanged(DialogField field) { ! validateSettings(PREF_COMPILER_TASK_TAGS, null, null); ! } ! ! } ! ! protected Control createContents(Composite parent) { ! setShell(parent.getShell()); ! ! Composite markersComposite= createMarkersTabContent(parent); ! ! validateSettings(null, null, null); ! ! return markersComposite; ! } ! ! private Composite createMarkersTabContent(Composite folder) { ! GridLayout layout= new GridLayout(); ! layout.marginHeight= 0; ! layout.marginWidth= 0; ! layout.numColumns= 2; ! ! Composite markersComposite= new Composite(folder, SWT.NULL); ! markersComposite.setLayout(layout); ! ! Control listControl= fTodoTasksList.getListControl(markersComposite); ! listControl.setLayoutData(new GridData(GridData.FILL_BOTH)); ! ! Control buttonsControl= fTodoTasksList.getButtonBox(markersComposite); ! buttonsControl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING)); ! ! fCaseSensitiveCheckBox.doFillIntoGrid(markersComposite, 2); ! ! return markersComposite; ! } ! ! protected void validateSettings(Key changedKey, String oldValue, String newValue) { ! if (changedKey != null) { ! if (PREF_COMPILER_TASK_TAGS.equals(changedKey)) { ! fTaskTagsStatus= validateTaskTags(); ! } else { ! return; ! } ! } else { ! fTaskTagsStatus= validateTaskTags(); ! } ! IStatus status= fTaskTagsStatus; //StatusUtil.getMostSevere(new IStatus[] { fTaskTagsStatus }); ! fContext.statusChanged(status); ! } ! ! private IStatus validateTaskTags() { ! return new StatusInfo(); ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#performOk(boolean) ! */ ! public boolean performOk(boolean enabled) { ! packTodoTasks(); ! return super.performOk(enabled); ! } ! ! ! protected String[] getFullBuildDialogStrings(boolean workspaceSettings) { ! String title= PreferencesMessages.TodoTaskConfigurationBlock_needsbuild_title; ! String message; ! if (fProject == null) { ! message= PreferencesMessages.TodoTaskConfigurationBlock_needsfullbuild_message; ! } else { ! message= PreferencesMessages.TodoTaskConfigurationBlock_needsprojectbuild_message; ! } ! return new String[] { title, message }; ! } ! ! /* (non-Javadoc) ! * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#updateControls() ! */ ! protected void updateControls() { ! unpackTodoTasks(); ! } ! ! private void unpackTodoTasks() { ! String currTags= getValue(PREF_COMPILER_TASK_TAGS); ! String currPrios= getValue(PREF_COMPILER_TASK_PRIORITIES); ! String[] tags= getTokens(currTags, ","); //$NON-NLS-1$ ! String[] prios= getTokens(currPrios, ","); //$NON-NLS-1$ ! ArrayList elements= new ArrayList(tags.length); ! for (int i= 0; i < tags.length; i++) { ! TodoTask task= new TodoTask(); ! task.name= tags[i].trim(); ! task.priority= (i < prios.length) ? prios[i] : PRIORITY_NORMAL; ! elements.add(task); ! } ! fTodoTasksList.setElements(elements); ! ! boolean isCaseSensitive= checkValue(PREF_COMPILER_TASK_CASE_SENSITIVE, ENABLED); ! fCaseSensitiveCheckBox.setSelection(isCaseSensitive); ! } ! ! private void packTodoTasks() { ! StringBuffer tags= new StringBuffer(); ! StringBuffer prios= new StringBuffer(); ! List list= fTodoTasksList.getElements(); ! for (int i= 0; i < list.size(); i++) { ! if (i > 0) { ! tags.append(','); ! prios.append(','); ! } ! TodoTask elem= (TodoTask) list.get(i); ! tags.append(elem.name); ! prios.append(elem.priority); ! } ! setValue(PREF_COMPILER_TASK_TAGS, tags.toString()); ! setValue(PREF_COMPILER_TASK_PRIORITIES, prios.toString()); ! ! String state= fCaseSensitiveCheckBox.isSelected() ? ENABLED : DISABLED; ! setValue(PREF_COMPILER_TASK_CASE_SENSITIVE, state); ! ! } ! ! private void doTodoButtonPressed(int index) { ! TodoTask edited= null; ! if (index != IDX_ADD) { ! edited= (TodoTask) fTodoTasksList.getSelectedElements().get(0); ! } ! if (index == IDX_ADD || index == IDX_EDIT) { ! TodoTaskInputDialog dialog= new TodoTaskInputDialog(getShell(), edited, fTodoTasksList.getElements()); ! if (dialog.open() == Window.OK) { ! if (edited != null) { ! fTodoTasksList.replaceElement(edited, dialog.getResult()); ! } else { ! fTodoTasksList.addElement(dialog.getResult()); ! } ! } ! } else if (index == IDX_DEFAULT) { ! setToDefaultTask(edited); ! } ! } ! ! } --- 1,369 ---- ! /******************************************************************************* ! * 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.preferences; ! ! import java.util.ArrayList; ! import java.util.List; ! ! import org.eclipse.core.resources.IProject; ! import org.eclipse.core.runtime.IStatus; ! import org.eclipse.jface.resource.JFaceResources; ! import org.eclipse.jface.viewers.IFontProvider; ! import org.eclipse.jface.viewers.ITableLabelProvider; ! import org.eclipse.jface.viewers.LabelProvider; ! import org.eclipse.jface.viewers.Viewer; ! import org.eclipse.jface.viewers.ViewerSorter; ! import org.eclipse.jface.window.Window; ! import org.eclipse.swt.SWT; ! import org.eclipse.swt.graphics.Font; ! import org.eclipse.swt.graphics.Image; ! import org.eclipse.swt.layout.GridData; ! import org.eclipse.swt.layout.GridLayout; ! import org.eclipse.swt.widgets.Composite; ! import org.eclipse.swt.widgets.Control; ! import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; ! import org.rubypeople.rdt.core.RubyCore; ! import org.rubypeople.rdt.internal.corext.util.Messages; ! import org.rubypeople.rdt.internal.ui.dialogs.StatusInfo; ! import org.rubypeople.rdt.internal.ui.util.PixelConverter; ! import org.rubypeople.rdt.internal.ui.wizards.IStatusChangeListener; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.DialogField; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IDialogFieldListener; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.IListAdapter; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.ListDialogField; ! import org.rubypeople.rdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField; ! ! /** ! */ ! public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock { ! ! private static final Key PREF_COMPILER_TASK_TAGS= getJDTCoreKey(RubyCore.COMPILER_TASK_TAGS); ! private static final Key PREF_COMPILER_TASK_PRIORITIES= getJDTCoreKey(RubyCore.COMPILER_TASK_PRIORITIES); ! ! private static final Key PREF_COMPILER_TASK_CASE_SENSITIVE= getJDTCoreKey(RubyCore.COMPILER_TASK_CASE_SENSITIVE); ! ! private static final String PRIORITY_HIGH= RubyCore.COMPILER_TASK_PRIORITY_HIGH; ! private static final String PRIORITY_NORMAL= RubyCore.COMPILER_TASK_PRIORITY_NORMAL; ! private static final String PRIORITY_LOW= RubyCore.COMPILER_TASK_PRIORITY_LOW; ! ! private static final String ENABLED= RubyCore.ENABLED; ! private static final String DISABLED= RubyCore.DISABLED; ! ! public static class TodoTask { ! public String name; ! public String priority; ! } ! ! private class TodoTaskLabelProvider extends LabelProvider implements ITableLabelProvider, IFontProvider { ! ! public TodoTaskLabelProvider() { ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object) ! */ ! public Image getImage(Object element) { ! return null; // RubyPluginImages.get(RubyPluginImages.IMG_OBJS_REFACTORING_INFO); ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) ! */ ! public String getText(Object element) { ! return getColumnText(element, 0); ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) ! */ ! public Image getColumnImage(Object element, int columnIndex) { ! return null; ! } ! /* (non-Rubydoc) ! * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) ! */ ! public String getColumnText(Object element, int columnIndex) { ! TodoTask task= (TodoTask) element; ! if (columnIndex == 0) { ! String name= task.name; ! if (isDefaultTask(task)) { ! name=Messages.format(PreferencesMessages.TodoTaskConfigurationBlock_tasks_default, name); ! } ! return name; ! } else { ! if (PRIORITY_HIGH.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_high_priority; ! } else if (PRIORITY_NORMAL.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_normal_priority; ! } else if (PRIORITY_LOW.equals(task.priority)) { ! return PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_low_priority; ! } ! return ""; //$NON-NLS-1$ ! } ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object) ! */ ! public Font getFont(Object element) { ! if (isDefaultTask((TodoTask) element)) { ! return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); ! } ! return null; ! } ! } ! ! private static class TodoTaskSorter extends ViewerSorter { ! public int compare(Viewer viewer, Object e1, Object e2) { ! return collator.compare(((TodoTask) e1).name, ((TodoTask) e2).name); ! } ! } ! ! private static final int IDX_ADD= 0; ! private static final int IDX_EDIT= 1; ! private static final int IDX_REMOVE= 2; ! private static final int IDX_DEFAULT= 4; ! ! private IStatus fTaskTagsStatus; ! private ListDialogField fTodoTasksList; ! private SelectionButtonDialogField fCaseSensitiveCheckBox; ! ! ! public TodoTaskConfigurationBlock(IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { ! super(context, project, getKeys(), container); ! ! TaskTagAdapter adapter= new TaskTagAdapter(); ! String[] buttons= new String[] { ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_add_button, ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_edit_button, ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_remove_button, ! null, ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_setdefault_button, ! }; ! fTodoTasksList= new ListDialogField(adapter, buttons, new TodoTaskLabelProvider()); ! fTodoTasksList.setDialogFieldListener(adapter); ! fTodoTasksList.setRemoveButtonIndex(IDX_REMOVE); ! ! String[] columnsHeaders= new String[] { ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_name_column, ! PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_priority_column, ! }; ! ! fTodoTasksList.setTableColumns(new ListDialogField.ColumnsDescription(columnsHeaders, true)); ! fTodoTasksList.setViewerSorter(new TodoTaskSorter()); ! ! ! fCaseSensitiveCheckBox= new SelectionButtonDialogField(SWT.CHECK); ! fCaseSensitiveCheckBox.setLabelText(PreferencesMessages.TodoTaskConfigurationBlock_casesensitive_label); ! fCaseSensitiveCheckBox.setDialogFieldListener(adapter); ! ! unpackTodoTasks(); ! if (fTodoTasksList.getSize() > 0) { ! fTodoTasksList.selectFirstElement(); ! } else { ! fTodoTasksList.enableButton(IDX_EDIT, false); ! fTodoTasksList.enableButton(IDX_DEFAULT, false); ! } ! ! fTaskTagsStatus= new StatusInfo(); ! } ! ! public void setEnabled(boolean isEnabled) { ! fTodoTasksList.setEnabled(isEnabled); ! fCaseSensitiveCheckBox.setEnabled(isEnabled); ! } ! ! final boolean isDefaultTask(TodoTask task) { ! return fTodoTasksList.getIndexOfElement(task) == 0; ! } ! ! private void setToDefaultTask(TodoTask task) { ! List elements= fTodoTasksList.getElements(); ! elements.remove(task); ! elements.add(0, task); ! fTodoTasksList.setElements(elements); ! fTodoTasksList.enableButton(IDX_DEFAULT, false); ! } ! ! private static Key[] getKeys() { ! return new Key[] { ! PREF_COMPILER_TASK_TAGS, PREF_COMPILER_TASK_PRIORITIES, PREF_COMPILER_TASK_CASE_SENSITIVE ! }; ! } ! ! public class TaskTagAdapter implements IListAdapter, IDialogFieldListener { ! ! private boolean canEdit(List selectedElements) { ! return selectedElements.size() == 1; ! } ! ! private boolean canSetToDefault(List selectedElements) { ! return selectedElements.size() == 1 && !isDefaultTask((TodoTask) selectedElements.get(0)); ! } ! ! public void customButtonPressed(ListDialogField field, int index) { ! doTodoButtonPressed(index); ! } ! ! public void selectionChanged(ListDialogField field) { ! List selectedElements= field.getSelectedElements(); ! field.enableButton(IDX_EDIT, canEdit(selectedElements)); ! field.enableButton(IDX_DEFAULT, canSetToDefault(selectedElements)); ! } ! ! public void doubleClicked(ListDialogField field) { ! if (canEdit(field.getSelectedElements())) { ! doTodoButtonPressed(IDX_EDIT); ! } ! } ! ! public void dialogFieldChanged(DialogField field) { ! updateModel(field); ! } ! ! } ! ! protected Control createContents(Composite parent) { ! setShell(parent.getShell()); ! ! Composite markersComposite= createMarkersTabContent(parent); ! ! validateSettings(null, null, null); ! ! return markersComposite; ! } ! ! private Composite createMarkersTabContent(Composite folder) { ! GridLayout layout= new GridLayout(); ! layout.marginHeight= 0; ! layout.marginWidth= 0; ! layout.numColumns= 2; ! ! PixelConverter conv= new PixelConverter(folder); ! ! Composite markersComposite= new Composite(folder, SWT.NULL); ! markersComposite.setLayout(layout); ! markersComposite.setFont(folder.getFont()); ! ! GridData data= new GridData(GridData.FILL_BOTH); ! data.widthHint= conv.convertWidthInCharsToPixels(50); ! Control listControl= fTodoTasksList.getListControl(markersComposite); ! listControl.setLayoutData(data); ! ! Control buttonsControl= fTodoTasksList.getButtonBox(markersComposite); ! buttonsControl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING)); ! ! fCaseSensitiveCheckBox.doFillIntoGrid(markersComposite, 2); ! ! return markersComposite; ! } ! ! protected void validateSettings(Key changedKey, String oldValue, String newValue) { ! if (!areSettingsEnabled()) { ! return; ! } ! ! if (changedKey != null) { ! if (PREF_COMPILER_TASK_TAGS.equals(changedKey)) { ! fTaskTagsStatus= validateTaskTags(); ! } else { ! return; ! } ! } else { ! fTaskTagsStatus= validateTaskTags(); ! } ! IStatus status= fTaskTagsStatus; //StatusUtil.getMostSevere(new IStatus[] { fTaskTagsStatus }); ! fContext.statusChanged(status); ! } ! ! private IStatus validateTaskTags() { ! return new StatusInfo(); ! } ! ! protected final void updateModel(DialogField field) { ! if (field == fTodoTasksList) { ! StringBuffer tags= new StringBuffer(); ! StringBuffer prios= new StringBuffer(); ! List list= fTodoTasksList.getElements(); ! for (int i= 0; i < list.size(); i++) { ! if (i > 0) { ! tags.append(','); ! prios.append(','); ! } ! TodoTask elem= (TodoTask) list.get(i); ! tags.append(elem.name); ! prios.append(elem.priority); ! } ! setValue(PREF_COMPILER_TASK_TAGS, tags.toString()); ! setValue(PREF_COMPILER_TASK_PRIORITIES, prios.toString()); ! validateSettings(PREF_COMPILER_TASK_TAGS, null, null); ! } else if (field == fCaseSensitiveCheckBox) { ! String state= fCaseSensitiveCheckBox.isSelected() ? ENABLED : DISABLED; ! setValue(PREF_COMPILER_TASK_CASE_SENSITIVE, state); ! } ! } ! ! protected String[] getFullBuildDialogStrings(boolean workspaceSettings) { ! String title= PreferencesMessages.TodoTaskConfigurationBlock_needsbuild_title; ! String message; ! if (fProject == null) { ! message= PreferencesMessages.TodoTaskConfigurationBlock_needsfullbuild_message; ! } else { ! message= PreferencesMessages.TodoTaskConfigurationBlock_needsprojectbuild_message; ! } ! return new String[] { title, message }; ! } ! ! /* (non-Rubydoc) ! * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#updateControls() ! */ ! protected void updateControls() { ! unpackTodoTasks(); ! } ! ! private void unpackTodoTasks() { ! String currTags= getValue(PREF_COMPILER_TASK_TAGS); ! String currPrios= getValue(PREF_COMPILER_TASK_PRIORITIES); ! String[] tags= getTokens(currTags, ","); //$NON-NLS-1$ ! String[] prios= getTokens(currPrios, ","); //$NON-NLS-1$ ! ArrayList elements= new ArrayList(tags.length); ! for (int i= 0; i < tags.length; i++) { ! TodoTask task= new TodoTask(); ! task.name= tags[i].trim(); ! task.priority= (i < prios.length) ? prios[i] : PRIORITY_NORMAL; ! elements.add(task); ! } ! fTodoTasksList.setElements(elements); ! ! boolean isCaseSensitive= checkValue(PREF_COMPILER_TASK_CASE_SENSITIVE, ENABLED); ! fCaseSensitiveCheckBox.setSelection(isCaseSensitive); ! } ! ! private void doTodoButtonPressed(int index) { ! TodoTask edited= null; ! if (index != IDX_ADD) { ! edited= (TodoTask) fTodoTasksList.getSelectedElements().get(0); ! } ! if (index == IDX_ADD || index == IDX_EDIT) { ! TodoTaskInputDialog dialog= new TodoTaskInputDialog(getShell(), edited, fTodoTasksList.getElements()); ! if (dialog.open() == Window.OK) { ! if (edited != null) { ! fTodoTasksList.replaceElement(edited, dialog.getResult()); ! } else { ! fTodoTasksList.addElement(dialog.getResult()); ! } ! } ! } else if (index == IDX_DEFAULT) { ! setToDefaultTask(edited); ! } ! } ! ! } --- NEW FILE: ProblemSeveritiesPreferencePage.java --- /******************************************************************************* * 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.preferences; import java.util.Map; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; import org.rubypeople.rdt.internal.ui.RubyPlugin; /** * Page used to configure both workspace and project specific compiler settings */ public class ProblemSeveritiesPreferencePage extends PropertyAndPreferencePage { public static final String PREF_ID= "org.rubypeople.rdt.ui.preferences.ProblemSeveritiesPreferencePage"; //$NON-NLS-1$ public static final String PROP_ID= "org.rubypeople.rdt.ui.propertyPages.ProblemSeveritiesPreferencePage"; //$NON-NLS-1$ public static final String DATA_SELECT_OPTION_KEY= "select_option_key"; //$NON-NLS-1$ public static final String DATA_SELECT_OPTION_QUALIFIER= "select_option_qualifier"; //$NON-NLS-1$ private ProblemSeveritiesConfigurationBlock fConfigurationBlock; public ProblemSeveritiesPreferencePage() { setPreferenceStore(RubyPlugin.getDefault().getPreferenceStore()); //setDescription(PreferencesMessages.getString("ProblemSeveritiesPreferencePage.description")); //$NON-NLS-1$ // only used when page is shown programatically setTitle(PreferencesMessages.ProblemSeveritiesPreferencePage_title); } /* * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl(Composite parent) { IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); fConfigurationBlock= new ProblemSeveritiesConfigurationBlock(getNewStatusChangedListener(), getProject(), container); super.createControl(parent); if (isProjectPreferencePage()) { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IRubyHelpContextIds.COMPILER_PROPERTY_PAGE); } else { PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IRubyHelpContextIds.COMPILER_PREFERENCE_PAGE); } } protected Control createPreferenceContent(Composite composite) { return fConfigurationBlock.createContents(composite); } protected boolean hasProjectSpecificOptions(IProject project) { return fConfigurationBlock.hasProjectSpecificOptions(project); } /* (non-Rubydoc) * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID() */ protected String getPreferencePageID() { return PREF_ID; } /* (non-Rubydoc) * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID() */ protected String getPropertyPageID() { return PROP_ID; } /* (non-Rubydoc) * @see org.eclipse.jface.dialogs.DialogPage#dispose() */ public void dispose() { if (fConfigurationBlock != null) { fConfigurationBlock.dispose(); } super.dispose(); } /* (non-Rubydoc) * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#enableProjectSpecificSettings(boolean) */ protected void enableProjectSpecificSettings(boolean useProjectSpecificSettings) { super.enableProjectSpecificSettings(useProjectSpecificSettings); if (fConfigurationBlock != null) { fConfigurationBlock.useProjectSpecificSettings(useProjectSpecificSettings); } } /* * @see org.eclipse.jface.preference.IPreferencePage#performDefaults() */ protected void performDefaults() { super.performDefaults(); if (fConfigurationBlock != null) { fConfigurationBlock.performDefaults(); } } /* * @see org.eclipse.jface.preference.IPreferencePage#performOk() */ public boolean performOk() { if (fConfigurationBlock != null && !fConfigurationBlock.performOk()) { return false; } return super.performOk(); } /* * @see org.eclipse.jface.preference.IPreferencePage#performApply() */ public void performApply() { if (fConfigurationBlock != null) { fConfigurationBlock.performApply(); } } /* (non-Rubydoc) * @see org.eclipse.jface.preference.PreferencePage#applyData(java.lang.Object) */ public void applyData(Object data) { super.applyData(data); if (data instanceof Map && fConfigurationBlock != null) { Map map= (Map) data; Object key= map.get(DATA_SELECT_OPTION_KEY); Object qualifier= map.get(DATA_SELECT_OPTION_QUALIFIER); if (key instanceof String && qualifier instanceof String) { fConfigurationBlock.selectOption((String) key, (String) qualifier); } } } /* (non-Rubydoc) * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#setElement(org.eclipse.core.runtime.IAdaptable) */ public void setElement(IAdaptable element) { super.setElement(element); setDescription(null); // no description for property page } } Index: OptionsConfigurationBlock.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/OptionsConfigurationBlock.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OptionsConfigurationBlock.java 5 Mar 2005 16:02:19 -0000 1.3 --- OptionsConfigurationBlock.java 17 May 2006 02:43:37 -0000 1.4 *************** *** 1,695 **** ! /******************************************************************************* ! * Copyright (c) 2000, 2004 IBM Corporation and others. ! * All rights reserved. This program and the accompanying materials ! * are made available under the terms of the Common Public License v1.0 ! * which accompanies this distribution, and is available at ! * http://www.eclipse.org/legal/cpl-v10.html ! * ! * Contributors: ! * IBM Corporation - initial API and implementation ! *******************************************************************************/ [...1547 lines suppressed...] ! return comboBox; ! } ! Button checkBox= getCheckBox(key); ! if (checkBox != null) { ! return checkBox; ! } ! Text text= getTextControl(key); ! if (text != null) { ! return text; ! } ! return null; ! } ! ! protected void setComboEnabled(Key key, boolean enabled) { ! Combo combo= getComboBox(key); ! Label label= (Label) fLabels.get(combo); ! combo.setEnabled(enabled); ! label.setEnabled(enabled); ! } ! } |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:41:13
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24172/src/org/rubypeople/rdt/internal/core/parser Added Files: RubyLintVisitor.java ParserOptions.java InOrderVisitor.java Log Message: Add support for a Ruby "Lint" like AST visitor which will create semantic analysis and warnings ala JDT --- NEW FILE: InOrderVisitor.java --- /* * Author: C.Williams * * Copyright (c) 2004 RubyPeople. * * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. You * can get copy of the GPL along with further information about RubyPeople and * third party software bundled with RDT in the file * org.rubypeople.rdt.core_x.x.x/RDT.license or otherwise at * http://www.rubypeople.org/RDT.license. * * RDT is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * RDT is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. [...1135 lines suppressed...] * (non-Javadoc) * * @see org.jruby.ast.visitor.NodeVisitor#visitZSuperNode(org.jruby.ast.ZSuperNode) */ public Instruction visitZSuperNode(ZSuperNode iVisited) { handleNode(iVisited); return null; } protected Instruction handleNode(Node visited) { return null; } @Override protected Instruction visitNode(Node iVisited) { // TODO Auto-generated method stub return null; } } --- NEW FILE: RubyLintVisitor.java --- package org.rubypeople.rdt.internal.core.parser; import java.util.HashSet; import java.util.Set; import org.jruby.ast.BlockNode; import org.jruby.ast.CallNode; import org.jruby.ast.ConstDeclNode; import org.jruby.ast.DefnNode; import org.jruby.ast.DefsNode; import org.jruby.ast.FCallNode; import org.jruby.ast.FalseNode; import org.jruby.ast.IfNode; import org.jruby.ast.IterNode; import org.jruby.ast.NilNode; import org.jruby.ast.Node; import org.jruby.ast.ScopeNode; import org.jruby.ast.TrueNode; import org.jruby.ast.WhenNode; import org.jruby.evaluator.Instruction; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.rdt.core.IProblemRequestor; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.parser.IProblem; public class RubyLintVisitor extends InOrderVisitor { private IProblemRequestor problemRequestor; private Set assignedConstants; private Set methodsCalled; public RubyLintVisitor(IProblemRequestor problemRequestor) { this.problemRequestor = problemRequestor; assignedConstants = new HashSet(); methodsCalled = new HashSet(); } public Instruction visitFCallNode(FCallNode iVisited) { methodsCalled.add(iVisited.getName()); return super.visitFCallNode(iVisited); } public Instruction visitCallNode(CallNode iVisited) { methodsCalled.add(iVisited.getName()); return super.visitCallNode(iVisited); } public Instruction visitIfNode(IfNode iVisited) { Node condition = iVisited.getCondition(); if (condition instanceof TrueNode) { problemRequestor.acceptProblem(new Warning(iVisited.getPosition(), "Condition is always true")); } else if ((condition instanceof FalseNode) || (condition instanceof NilNode)) { problemRequestor.acceptProblem(new Warning(iVisited.getPosition(), "Condition is always false")); } if (iVisited.getThenBody() == null) { IProblem problem = createProblem( RubyCore.COMPILER_PB_EMPTY_STATEMENT, iVisited .getPosition(), "Empty Conditional Body"); if (problem != null) problemRequestor.acceptProblem(problem); } return super.visitIfNode(iVisited); } public Instruction visitWhenNode(WhenNode iVisited) { if (iVisited.getBodyNode() == null) { IProblem problem = createProblem( RubyCore.COMPILER_PB_EMPTY_STATEMENT, iVisited .getPosition(), "Empty When Body"); if (problem != null) problemRequestor.acceptProblem(problem); } return super.visitWhenNode(iVisited); } public Instruction visitBlockNode(BlockNode iVisited) { return super.visitBlockNode(iVisited); } public Instruction visitIterNode(IterNode iVisited) { if (iVisited.getBodyNode() == null) { IProblem problem = createProblem( RubyCore.COMPILER_PB_EMPTY_STATEMENT, iVisited .getPosition(), "Empty Block"); if (problem != null) problemRequestor.acceptProblem(problem); } return super.visitIterNode(iVisited); } public Instruction visitDefnNode(DefnNode iVisited) { // TODO Analyze method visibility. Create warning for uncalled private // methods ScopeNode scope = iVisited.getBodyNode(); if (scope.getBodyNode() == null) { IProblem problem = createProblem( RubyCore.COMPILER_PB_EMPTY_STATEMENT, iVisited .getPosition(), "Empty Method Definition"); if (problem != null) problemRequestor.acceptProblem(problem); } return super.visitDefnNode(iVisited); } public Instruction visitDefsNode(DefsNode iVisited) { ScopeNode scope = iVisited.getBodyNode(); if (scope.getBodyNode() == null) { IProblem problem = createProblem( RubyCore.COMPILER_PB_EMPTY_STATEMENT, iVisited .getPosition(), "Empty Method Definition"); if (problem != null) problemRequestor.acceptProblem(problem); } return super.visitDefsNode(iVisited); } protected Instruction handleNode(Node visited) { System.out.println(visited.toString() + ", position -> " + visited.getPosition()); return super.handleNode(visited); } public Instruction visitConstDeclNode(ConstDeclNode iVisited) { String name = iVisited.getName(); if (assignedConstants.contains(name)) { problemRequestor.acceptProblem(new Warning(iVisited.getPosition(), "Reassignment of a constant")); } else assignedConstants.add(name); return super.visitConstDeclNode(iVisited); } private IProblem createProblem(String compilerOption, ISourcePosition position, String message) { String value = RubyCore.getOption(compilerOption); if (value.equals(RubyCore.WARNING)) return new Warning(position, message); if (value.equals(RubyCore.ERROR)) return new Error(position, message); return null; } } --- NEW FILE: ParserOptions.java --- package org.rubypeople.rdt.internal.core.parser; import java.util.HashMap; import java.util.Map; import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.util.CharOperation; public class ParserOptions { public static final long EnsureBlockNotCompleting = 0x1; public static final long UnusedLocalVariable = 0x2; public static final long UnusedPrivateMember = 0x4; public static final long MaskedRescueBlock = 0x8; public static final long UnusedArgument = 0x10; public static final long EmptyStatement = 0x20; public static final long UnnecessaryElse = 0x40; public static final long NullReference = 0x80; public static final long FallthroughCase = 0x100; public static final String ERROR = RubyCore.ERROR; public static final String WARNING = RubyCore.WARNING; public static final String IGNORE = RubyCore.IGNORE; public static final String ENABLED = RubyCore.ENABLED; public static final String DISABLED = RubyCore.DISABLED; // Default severity level for handlers public long errorThreshold = 0; public long warningThreshold = EnsureBlockNotCompleting | UnusedLocalVariable | UnusedPrivateMember /*| NullReference -- keep RubyCore#getDefaultOptions comment in sync */; // source encoding format public String defaultEncoding = null; // will use the platform default encoding // tags used to recognize tasks in comments public char[][] taskTags = null; public char[][] taskPriorites = null; public boolean isTaskCaseSensitive = true; public Map getMap() { Map optionsMap = new HashMap(30); optionsMap.put(RubyCore.COMPILER_PB_HIDDEN_RESCUE_BLOCK, getSeverityString(MaskedRescueBlock)); optionsMap.put(RubyCore.COMPILER_PB_UNUSED_LOCAL, getSeverityString(UnusedLocalVariable)); optionsMap.put(RubyCore.COMPILER_PB_UNUSED_PARAMETER, getSeverityString(UnusedArgument)); optionsMap.put(RubyCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER, getSeverityString(UnusedPrivateMember)); optionsMap.put(RubyCore.COMPILER_PB_EMPTY_STATEMENT, getSeverityString(EmptyStatement)); optionsMap.put(RubyCore.COMPILER_PB_UNNECESSARY_ELSE, getSeverityString(UnnecessaryElse)); optionsMap.put(RubyCore.COMPILER_PB_ENSURE_BLOCK_NOT_COMPLETING, getSeverityString(EnsureBlockNotCompleting)); if (this.defaultEncoding != null) { optionsMap.put(RubyCore.CORE_ENCODING, this.defaultEncoding); } optionsMap.put(RubyCore.COMPILER_TASK_TAGS, this.taskTags == null ? "" : new String(CharOperation.concatWith(this.taskTags,','))); //$NON-NLS-1$ optionsMap.put(RubyCore.COMPILER_TASK_PRIORITIES, this.taskPriorites == null ? "" : new String(CharOperation.concatWith(this.taskPriorites,','))); //$NON-NLS-1$ optionsMap.put(RubyCore.COMPILER_TASK_CASE_SENSITIVE, this.isTaskCaseSensitive ? ENABLED : DISABLED); optionsMap.put(RubyCore.COMPILER_PB_NULL_REFERENCE, getSeverityString(NullReference)); optionsMap.put(RubyCore.COMPILER_PB_FALLTHROUGH_CASE, getSeverityString(FallthroughCase)); return optionsMap; } public String getSeverityString(long irritant) { if((this.warningThreshold & irritant) != 0) return WARNING; if((this.errorThreshold & irritant) != 0) return ERROR; return IGNORE; } } |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:41:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24172/src/org/rubypeople/rdt/internal/core/builder Modified Files: RubyCodeAnalyzer.java Added Files: ProblemRequestorMarkerManager.java Log Message: Add support for a Ruby "Lint" like AST visitor which will create semantic analysis and warnings ala JDT Index: RubyCodeAnalyzer.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/RubyCodeAnalyzer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyCodeAnalyzer.java 13 Nov 2005 13:05:12 -0000 1.2 --- RubyCodeAnalyzer.java 17 May 2006 02:41:07 -0000 1.3 *************** *** 22,25 **** --- 22,26 ---- import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.parser.ImmediateWarnings; + import org.rubypeople.rdt.internal.core.parser.RubyLintVisitor; import org.rubypeople.rdt.internal.core.parser.RubyParser; *************** *** 41,46 **** --- 42,50 ---- public void compileFile(IFile file) throws CoreException { Reader reader = new InputStreamReader(file.getContents()); + markerManager.removeProblemsAndTasksFor(file); try { Node rootNode = parser.parse(file, reader); + RubyLintVisitor visitor = new RubyLintVisitor(new ProblemRequestorMarkerManager(file, markerManager)); + rootNode.accept(visitor); indexUpdater.update(file, rootNode, true); } catch (SyntaxException e) { --- NEW FILE: ProblemRequestorMarkerManager.java --- package org.rubypeople.rdt.internal.core.builder; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.rdt.core.IProblemRequestor; import org.rubypeople.rdt.core.parser.IProblem; import org.rubypeople.rdt.internal.core.parser.RdtPosition; import com.sun.jmx.snmp.tasks.Task; public class ProblemRequestorMarkerManager implements IProblemRequestor { private IMarkerManager markerManager; private boolean active = false; private IFile file; public ProblemRequestorMarkerManager(IFile file, IMarkerManager markerManager) { this.markerManager = markerManager; this.file = file; } public void acceptProblem(IProblem problem) { // TODO Bl;ah blah blah // if (!isActive()) return; if (problem.isWarning()) { markerManager.addWarning(file, problem.getMessage()); return; } if (problem.isError()) { markerManager.createSyntaxError(file, new SyntaxException( new RdtPosition(problem.getSourceLineNumber(), problem .getSourceStart(), problem.getSourceEnd()), problem .getMessage())); return; } if (problem.isTask()) { List tasks = new ArrayList(); Task task = (Task) problem; tasks.add(task); try { markerManager.createTasks(file, tasks); } catch (CoreException e) { // TODO Auto-generated catch block e.printStackTrace(); } return; } } public void beginReporting() { active = true; } public void endReporting() { active = false; } public boolean isActive() { // TODO Auto-generated method stub return active; } } |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:41:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24172/src/org/rubypeople/rdt/internal/core Modified Files: RubyScriptProblemFinder.java Log Message: Add support for a Ruby "Lint" like AST visitor which will create semantic analysis and warnings ala JDT Index: RubyScriptProblemFinder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptProblemFinder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyScriptProblemFinder.java 10 Feb 2006 18:29:16 -0000 1.7 --- RubyScriptProblemFinder.java 17 May 2006 02:41:08 -0000 1.8 *************** *** 11,14 **** --- 11,15 ---- import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; + import org.jruby.ast.Node; import org.jruby.lexer.yacc.SyntaxException; import org.rubypeople.rdt.core.IProblemRequestor; *************** *** 16,19 **** --- 17,21 ---- import org.rubypeople.rdt.internal.core.parser.Error; import org.rubypeople.rdt.internal.core.parser.RdtWarnings; + import org.rubypeople.rdt.internal.core.parser.RubyLintVisitor; import org.rubypeople.rdt.internal.core.parser.RubyParser; import org.rubypeople.rdt.internal.core.parser.TaskParser; *************** *** 32,36 **** String contents = new String(charContents); try { ! parser.parse((IFile) script.getUnderlyingResource(), new StringReader(contents)); } catch (SyntaxException e) { problemRequestor.acceptProblem(new Error(e.getPosition(), "Syntax Error")); --- 34,40 ---- String contents = new String(charContents); try { ! Node node = parser.parse((IFile) script.getUnderlyingResource(), new StringReader(contents)); ! RubyLintVisitor visitor = new RubyLintVisitor(problemRequestor); ! node.accept(visitor); } catch (SyntaxException e) { problemRequestor.acceptProblem(new Error(e.getPosition(), "Syntax Error")); |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:41:11
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24172/src/org/rubypeople/rdt/internal/core/util Modified Files: CharOperation.java Log Message: Add support for a Ruby "Lint" like AST visitor which will create semantic analysis and warnings ala JDT Index: CharOperation.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CharOperation.java 25 Mar 2006 02:27:35 -0000 1.4 --- CharOperation.java 17 May 2006 02:41:08 -0000 1.5 *************** *** 8,11 **** --- 8,16 ---- */ public class CharOperation { + + /** + * Constant for an empty char array + */ + public static final char[] NO_CHAR = new char[0]; /** *************** *** 880,882 **** --- 885,943 ---- return hash & 0x7FFFFFFF; } + + /** + * Answers the concatenation of the given array parts using the given separator between each part. + * <br> + * <br> + * For example:<br> + * <ol> + * <li><pre> + * array = { { 'a' }, { 'b' } } + * separator = '.' + * => result = { 'a', '.', 'b' } + * </pre> + * </li> + * <li><pre> + * array = null + * separator = '.' + * => result = { } + * </pre></li> + * </ol> + * + * @param array the given array + * @param separator the given separator + * @return the concatenation of the given array parts using the given separator between each part + */ + public static final char[] concatWith(char[][] array, char separator) { + int length = array == null ? 0 : array.length; + if (length == 0) + return CharOperation.NO_CHAR; + + int size = length - 1; + int index = length; + while (--index >= 0) { + if (array[index].length == 0) + size--; + else + size += array[index].length; + } + if (size <= 0) + return CharOperation.NO_CHAR; + char[] result = new char[size]; + index = length; + while (--index >= 0) { + length = array[index].length; + if (length > 0) { + System.arraycopy( + array[index], + 0, + result, + (size -= length), + length); + if (--size >= 0) + result[size] = separator; + } + } + return result; + } } |
|
From: Christopher W. <caw...@us...> - 2006-05-17 02:41:11
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24172/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: Add support for a Ruby "Lint" like AST visitor which will create semantic analysis and warnings ala JDT Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** RubyCore.java 4 Apr 2006 23:06:22 -0000 1.33 --- RubyCore.java 17 May 2006 02:41:08 -0000 1.34 *************** *** 154,157 **** --- 154,173 ---- /** + * Possible configurable option value. + * @see #getDefaultOptions() + */ + public static final String ERROR = "error"; //$NON-NLS-1$ + /** + * Possible configurable option value. + * @see #getDefaultOptions() + */ + public static final String WARNING = "warning"; //$NON-NLS-1$ + /** + * Possible configurable option value. + * @see #getDefaultOptions() + */ + public static final String IGNORE = "ignore"; //$NON-NLS-1$ + + /** * Possible configurable option value. * *************** *** 201,204 **** --- 217,273 ---- public static final String RUBY_SOURCE_CONTENT_TYPE = RubyCore.PLUGIN_ID+".rubySource" ; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.9.0 + */ + public static final String COMPILER_PB_ENSURE_BLOCK_NOT_COMPLETING = PLUGIN_ID + ".compiler.problem.ensureBlockNotCompletingNormally"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.90. + */ + public static final String COMPILER_PB_EMPTY_STATEMENT = PLUGIN_ID + ".compiler.problem.emptyStatement"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + */ + public static final String COMPILER_PB_HIDDEN_RESCUE_BLOCK = PLUGIN_ID + ".compiler.problem.hiddenRescueBlock"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.9.0 + */ + public static final String COMPILER_PB_FALLTHROUGH_CASE = PLUGIN_ID + ".compiler.problem.fallthroughCase"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.9.0 + */ + public static final String COMPILER_PB_NULL_REFERENCE = PLUGIN_ID + ".compiler.problem.nullReference"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + */ + public static final String COMPILER_PB_UNUSED_LOCAL = PLUGIN_ID + ".compiler.problem.unusedLocal"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + */ + public static final String COMPILER_PB_UNUSED_PARAMETER = PLUGIN_ID + ".compiler.problem.unusedParameter"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.9.0 + */ + public static final String COMPILER_PB_UNUSED_PRIVATE_MEMBER = PLUGIN_ID + ".compiler.problem.unusedPrivateMember"; //$NON-NLS-1$ + /** + * Possible configurable option ID. + * @see #getDefaultOptions() + * @since 0.9.0 + */ + public static final String COMPILER_PB_UNNECESSARY_ELSE = PLUGIN_ID + ".compiler.problem.unnecessaryElse"; //$NON-NLS-1$ + + private SymbolIndex symbolIndex; private ISymbolFinder symbolFinder; |
|
From: Markus B. <mba...@us...> - 2006-05-16 23:59:28
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27747 Modified Files: config.xml customTargets.xml Log Message: Chanaged cvs host name to rubyeclipse.cvs.sourceforge.net Index: customTargets.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/customTargets.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** customTargets.xml 5 Feb 2006 19:44:44 -0000 1.9 --- customTargets.xml 16 May 2006 23:59:25 -0000 1.10 *************** *** 52,60 **** </target> <target name="getMapFilesWithExtMethod" unless="usePserver"> ! <property name="cvsRoot" value=":ext:cvs.sf.net:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> </target> <target name="getMapFilesWithPserverMethod" if="usePserver"> ! <property name="cvsRoot" value=":pserver:ano...@cv...:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> <replace dir="${buildDirectory}/maps" value=":pserver:anonymous@"> --- 52,60 ---- </target> <target name="getMapFilesWithExtMethod" unless="usePserver"> ! <property name="cvsRoot" value=":ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> </target> <target name="getMapFilesWithPserverMethod" if="usePserver"> ! <property name="cvsRoot" value=":pserver:ano...@ru...:/cvsroot/rubyeclipse" /> <cvs cvsroot="${cvsRoot}" dest="${buildDirectory}/maps" command="export -r ${mapVersionTag} org.rubypeople.rdt.build/map" /> <replace dir="${buildDirectory}/maps" value=":pserver:anonymous@"> Index: config.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/config.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** config.xml 16 May 2006 22:52:00 -0000 1.7 --- config.xml 16 May 2006 23:59:25 -0000 1.8 *************** *** 6,10 **** <!-- Defines where cruise looks for changes, to decide whether to run the build --> <modificationset quietperiod="120"> ! <cvs cvsroot=":ext:mba...@ru...:/cvsroot/rubyeclipse" module="rdt-all"/> </modificationset> --- 6,10 ---- <!-- Defines where cruise looks for changes, to decide whether to run the build --> <modificationset quietperiod="120"> ! <cvs cvsroot=":ext:mba...@ru...:/cvsroot/rubyeclipse" module="rdt-all"/> </modificationset> |
|
From: Markus B. <mba...@us...> - 2006-05-16 23:27:04
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/map In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16563/map Modified Files: rdt.map Log Message: new cvs server name: rubyeclipse.cvs.sourceforge.net Index: rdt.map =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/map/rdt.map,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rdt.map 16 May 2006 23:21:03 -0000 1.7 --- rdt.map 16 May 2006 23:27:01 -0000 1.8 *************** *** 14,40 **** ! fe...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature ! plugin@org.kxml2=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! fe...@or...-tests=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature/unit-tests-feature ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, --- 14,40 ---- ! fe...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature ! plugin@org.kxml2=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! fe...@or...-tests=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature/unit-tests-feature ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sourceforge.net:/cvsroot/rubyeclipse, |
|
From: Markus B. <mba...@us...> - 2006-05-16 23:21:09
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/map In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14668/map Modified Files: rdt.map Log Message: new cvs server name: rubyeclipse.cvs.sf.net Index: rdt.map =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/map/rdt.map,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rdt.map 6 Jan 2005 21:42:11 -0000 1.6 --- rdt.map 16 May 2006 23:21:03 -0000 1.7 *************** *** 14,40 **** ! fe...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature ! plugin@org.kxml2=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! fe...@or...-tests=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature/unit-tests-feature ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:cvs.sf.net:/cvsroot/rubyeclipse, --- 14,40 ---- ! fe...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature ! plugin@org.kxml2=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! fe...@or...-tests=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse,,org.rubypeople.rdt-feature/unit-tests-feature ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, ! pl...@or...=HEAD,:ext:rubyeclipse.cvs.sf.net:/cvsroot/rubyeclipse, |
|
From: Markus B. <mba...@us...> - 2006-05-16 22:52:03
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4341 Modified Files: config.xml Log Message: changed CVSROOT to rubyeclipse.cvs.sf.net Index: config.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.build/cruiseControl/config.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.xml 14 Apr 2006 01:21:13 -0000 1.6 --- config.xml 16 May 2006 22:52:00 -0000 1.7 *************** *** 6,10 **** <!-- Defines where cruise looks for changes, to decide whether to run the build --> <modificationset quietperiod="120"> ! <cvs cvsroot=":ext:mba...@cv...:/cvsroot/rubyeclipse" module="rdt-all"/> </modificationset> --- 6,10 ---- <!-- Defines where cruise looks for changes, to decide whether to run the build --> <modificationset quietperiod="120"> ! <cvs cvsroot=":ext:mba...@ru...:/cvsroot/rubyeclipse" module="rdt-all"/> </modificationset> |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:30
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6037/src/org/rubypeople/rdt/testunit/launcher Modified Files: TestUnitLaunchShortcut.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: TestUnitLaunchShortcut.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitLaunchShortcut.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestUnitLaunchShortcut.java 9 Oct 2005 21:15:24 -0000 1.14 --- TestUnitLaunchShortcut.java 13 May 2006 19:52:27 -0000 1.15 *************** *** 51,55 **** ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode, container, "", ""); if (config != null) { ! config.launch(mode, null); } TestSearchEngine.findTests((IFile) rubyElement.getUnderlyingResource()); --- 51,55 ---- ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode, container, "", ""); if (config != null) { ! DebugUITools.launch(config, mode); } TestSearchEngine.findTests((IFile) rubyElement.getUnderlyingResource()); |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:26
|
Update of /cvsroot/rubyeclipse/org.jruby/.externalToolBuilders In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6026/.externalToolBuilders Modified Files: Create Jar File.launch Serialize Builtin Files.launch Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: Create Jar File.launch =================================================================== RCS file: /cvsroot/rubyeclipse/org.jruby/.externalToolBuilders/Create Jar File.launch,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Create Jar File.launch 7 Mar 2005 03:29:01 -0000 1.1 --- Create Jar File.launch 13 May 2006 19:52:24 -0000 1.2 *************** *** 3,12 **** <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> ! <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/> ! <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="jar.standalone,"/> </launchConfiguration> --- 3,22 ---- <stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/> + <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> + <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="jar.standalone,"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> ! <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> ! <listEntry value="1"/> ! </listAttribute> ! <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> + <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="jar.standalone,"/> + <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="jar.standalone,"/> + <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> + <listEntry value="/org.jruby/build.xml"/> + </listAttribute> + <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/> </launchConfiguration> Index: Serialize Builtin Files.launch =================================================================== RCS file: /cvsroot/rubyeclipse/org.jruby/.externalToolBuilders/Serialize Builtin Files.launch,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Serialize Builtin Files.launch 7 Mar 2005 03:29:02 -0000 1.1 --- Serialize Builtin Files.launch 13 May 2006 19:52:24 -0000 1.2 *************** *** 2,12 **** <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> ! <stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/jruby/src/compiler" type="2"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/jruby/src/builtin" type="2"/> </launchConfigurationWorkingSet> }"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> ! <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/> ! <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="serialize,"/> </launchConfiguration> --- 2,23 ---- <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> + <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> ! <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="serialize,"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> ! <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> ! <listEntry value="1"/> ! </listAttribute> ! <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> + <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_TARGETS" value="serialize,"/> + <stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" name="workingSet" label="workingSet" editPageId="org.eclipse.ui.resourceWorkingSetPage"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/jruby/src/builtin" type="2"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/jruby/src/compiler" type="2"/> </launchConfigurationWorkingSet>}"/> + <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="serialize,"/> + <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="serialize,"/> + <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> + <listEntry value="/org.jruby/build.xml"/> + </listAttribute> + <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${project_loc}/build.xml"/> </launchConfiguration> |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:24
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5993/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyDocumentProvider.java TogglePresentationAction.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: TogglePresentationAction.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/TogglePresentationAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TogglePresentationAction.java 10 Feb 2006 20:14:31 -0000 1.1 --- TogglePresentationAction.java 13 May 2006 19:52:21 -0000 1.2 *************** *** 16,20 **** import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; - import org.eclipse.ui.IEditorInput; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.texteditor.ITextEditor; --- 16,19 ---- Index: RubyDocumentProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyDocumentProvider.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RubyDocumentProvider.java 5 May 2006 01:13:27 -0000 1.23 --- RubyDocumentProvider.java 13 May 2006 19:52:21 -0000 1.24 *************** *** 10,18 **** import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; - import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.util.ListenerList; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; - import org.eclipse.core.runtime.content.IContentType; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.jface.preference.IPreferenceStore; --- 10,16 ---- *************** *** 47,51 **** import org.eclipse.ui.texteditor.AnnotationPreferenceLookup; import org.eclipse.ui.texteditor.IDocumentProvider; - import org.eclipse.ui.texteditor.IElementStateListener; import org.eclipse.ui.texteditor.MarkerAnnotation; import org.eclipse.ui.texteditor.MarkerUtilities; --- 45,48 ---- |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:24
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5993/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: MembersOrderPreferencePage.java RubyTemplatePreferencePage.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: RubyTemplatePreferencePage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyTemplatePreferencePage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyTemplatePreferencePage.java 18 Feb 2006 17:29:33 -0000 1.2 --- RubyTemplatePreferencePage.java 13 May 2006 19:52:20 -0000 1.3 *************** *** 18,22 **** import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.jface.text.templates.Template; - import org.eclipse.jface.text.templates.TemplateContextType; import org.eclipse.jface.text.templates.persistence.TemplatePersistenceData; import org.eclipse.jface.viewers.IStructuredSelection; --- 18,21 ---- Index: MembersOrderPreferencePage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/MembersOrderPreferencePage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MembersOrderPreferencePage.java 10 Feb 2006 19:52:26 -0000 1.1 --- MembersOrderPreferencePage.java 13 May 2006 19:52:20 -0000 1.2 *************** *** 32,36 **** import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.PlatformUI; - import org.rubypeople.rdt.core.Flags; import org.rubypeople.rdt.core.IMethod; import org.rubypeople.rdt.internal.ui.IRubyHelpContextIds; --- 32,35 ---- |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5993/src/org/rubypeople/rdt/internal/ui/wizards Modified Files: RubyNewClassWizardPage.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: RubyNewClassWizardPage.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/wizards/RubyNewClassWizardPage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyNewClassWizardPage.java 13 Apr 2006 23:00:38 -0000 1.2 --- RubyNewClassWizardPage.java 13 May 2006 19:52:20 -0000 1.3 *************** *** 1,6 **** package org.rubypeople.rdt.internal.ui.wizards; - import java.util.StringTokenizer; - import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; --- 1,4 ---- |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:23
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5993/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCodeScanner.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: RubyCodeScanner.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCodeScanner.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyCodeScanner.java 8 Apr 2006 06:17:58 -0000 1.12 --- RubyCodeScanner.java 13 May 2006 19:52:21 -0000 1.13 *************** *** 7,11 **** import org.eclipse.jface.text.rules.IToken; import org.eclipse.jface.text.rules.IWordDetector; - import org.eclipse.jface.text.rules.NumberRule; import org.eclipse.jface.text.rules.WordRule; import org.rubypeople.rdt.internal.ui.text.IRubyColorConstants; --- 7,10 ---- |
|
From: David C. <dc...@us...> - 2006-05-13 19:52:19
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5979/src/org/rubypeople/rdt/internal/debug/ui/launcher Modified Files: RubyApplicationShortcut.java RubyEnvironmentTab.java Log Message: Change the launch for tests and applciations to obey Run/Debug launching preferences. Index: RubyEnvironmentTab.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyEnvironmentTab.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RubyEnvironmentTab.java 22 Feb 2006 21:05:37 -0000 1.23 --- RubyEnvironmentTab.java 13 May 2006 19:52:15 -0000 1.24 *************** *** 27,33 **** import org.eclipse.swt.widgets.TabItem; import org.rubypeople.rdt.core.IRubyProject; - import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.core.LoadpathEntry; - import org.rubypeople.rdt.internal.core.RubyModel; import org.rubypeople.rdt.internal.core.RubyModelManager; import org.rubypeople.rdt.internal.debug.ui.RdtDebugUiMessages; --- 27,31 ---- Index: RubyApplicationShortcut.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.ui/src/org/rubypeople/rdt/internal/debug/ui/launcher/RubyApplicationShortcut.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** RubyApplicationShortcut.java 18 Sep 2005 15:17:49 -0000 1.17 --- RubyApplicationShortcut.java 13 May 2006 19:52:15 -0000 1.18 *************** *** 15,18 **** --- 15,19 ---- import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; + import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.ILaunchShortcut; import org.eclipse.jface.dialogs.ErrorDialog; *************** *** 70,74 **** ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode); if (config != null) { ! config.launch(mode, null); } } --- 71,75 ---- ILaunchConfiguration config = findOrCreateLaunchConfiguration(rubyElement, mode); if (config != null) { ! DebugUITools.launch(config, mode); } } |
|
From: Christopher W. <caw...@us...> - 2006-05-12 22:01:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5522/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCompletionProcessor.java Log Message: fix ticket #125 Index: RubyCompletionProcessor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/RubyCompletionProcessor.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RubyCompletionProcessor.java 24 Feb 2006 02:02:20 -0000 1.18 --- RubyCompletionProcessor.java 12 May 2006 22:01:23 -0000 1.19 *************** *** 248,253 **** IRubyCompletionProposal[] keyWordResults = getKeywordProposals(documentOffset); if (keyWordResults.length > 0) { - List removals = new ArrayList(); - // update relevance of template proposals that match with a // keyword --- 248,251 ---- *************** *** 270,279 **** } } ! if (isKeyword(name)) ! removals.add(curr); } } - - result.removeAll(removals); } return result; --- 268,274 ---- } } ! } } } return result; |
|
From: Christopher W. <caw...@us...> - 2006-05-12 21:56:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3940/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: TS_InternalUiRubyEditor.java Added Files: TC_TabConverter.java Removed Files: TC_TabExpander.java Log Message: try to fix up the tests to compile (though they're still broken), add more tests for our partition scanner (needs to be integrated with our already existing tests) --- NEW FILE: TC_TabConverter.java --- package org.rubypeople.rdt.internal.ui.rubyeditor; import junit.framework.TestCase; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.DocumentCommand; import org.rubypeople.rdt.internal.ui.rubyeditor.RubyEditor.TabConverter; public class TC_TabConverter extends TestCase { private static final String TEST_TEXT = "012345678\n123456789\n"; private static class TestDocumentCommand extends DocumentCommand { public TestDocumentCommand(int offset) { this.offset = offset; } } public void testSpacesForTab() { verifyTabExpansion(4, 0, 4); verifyTabExpansion(4, 1, 3); verifyTabExpansion(4, 2, 2); verifyTabExpansion(4, 3, 1); verifyTabExpansion(4, 4, 4); verifyTabExpansion(4, 5, 3); verifyTabExpansion(5, 4, 1); } public void testSubsequentLines() { verifyTabExpansion(4, 10, 4); verifyTabExpansion(4, 12, 2); verifyTabExpansion(4, 14, 4); } public void testSpacesOneSpacePerTab() { verifyTabExpansion(1, 0, 1); verifyTabExpansion(1, 1, 1); verifyTabExpansion(1, 2, 1); verifyTabExpansion(1, 3, 1); verifyTabExpansion(1, 4, 1); } public void testSpacesZeroSpacPerTab() { verifyTabExpansion(0, 0, 1); verifyTabExpansion(0, 1, 1); verifyTabExpansion(0, 2, 1); verifyTabExpansion(0, 3, 1); verifyTabExpansion(0, 4, 1); } private void verifyTabExpansion(int spacesPerTab, int currentOffset, int expectedCountOfTabs) { TabConverter converter = new TabConverter(); converter.setNumberOfSpacesPerTab(spacesPerTab); TestDocumentCommand command = new TestDocumentCommand(currentOffset); command.text = "\t"; Document document = new Document(TEST_TEXT); converter.customizeDocumentCommand(document, command); String message = "Offset = "+currentOffset + "; tabWidth = "+spacesPerTab; assertEquals(message, " ".substring(0,expectedCountOfTabs), command.text); // assertEquals("Full indent (" + spacesPerTab + ")", " ".substring(0,spacesPerTab), expander.getFullIndent()); } } Index: TS_InternalUiRubyEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui.tests/src/org/rubypeople/rdt/internal/ui/rubyeditor/TS_InternalUiRubyEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TS_InternalUiRubyEditor.java 16 Oct 2005 23:52:40 -0000 1.1 --- TS_InternalUiRubyEditor.java 12 May 2006 21:56:12 -0000 1.2 *************** *** 7,11 **** public static TestSuite suite() { TestSuite suite = new TestSuite("org.rubypeople.rdt.internal.ui.rubyeditor"); ! suite.addTestSuite(TC_TabExpander.class); return suite; } --- 7,11 ---- public static TestSuite suite() { TestSuite suite = new TestSuite("org.rubypeople.rdt.internal.ui.rubyeditor"); ! suite.addTestSuite(TC_TabConverter.class); return suite; } --- TC_TabExpander.java DELETED --- |