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...> - 2005-12-03 02:57:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5443/META-INF Modified Files: MANIFEST.MF Log Message: add org.rubypeople.rdt.internal.ui.symbols to list of exported packages (we have to export everything any other plugins - including our test plugins - use) We really should think about merging the tests into the actual plugins in a different root source folder (like testsrc or test), so we don't have to expose every package Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/META-INF/MANIFEST.MF,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MANIFEST.MF 22 Nov 2005 01:25:30 -0000 1.1 --- MANIFEST.MF 3 Dec 2005 02:57:01 -0000 1.2 *************** *** 20,23 **** --- 20,24 ---- org.rubypeople.rdt.internal.ui.rubyeditor.outline, org.rubypeople.rdt.internal.ui.rubyeditor.templates, + org.rubypeople.rdt.internal.ui.symbols, org.rubypeople.rdt.internal.ui.text, org.rubypeople.rdt.internal.ui.text.folding, |
|
From: Christopher W. <caw...@us...> - 2005-12-02 16:19:31
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22335 Modified Files: Changelog.txt Log Message: add some text about syntax highlighting changes Index: Changelog.txt =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt/Changelog.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Changelog.txt 26 Oct 2005 21:55:08 -0000 1.18 --- Changelog.txt 2 Dec 2005 16:19:17 -0000 1.19 *************** *** 1,15 **** Changes since 0.6.0: ! * Multiple debugger session possible because a free port will be used for the debugger communication. The port is written to a ! temporary file and conveyed to the ruby process with "-r<tmpFile>". The fixed port used in the past (1098) is still the default ! port in the case that a temporary file can not be created ! * Catchpoints: ! * The default was to halt at every type of StandardError, the new default is *not* to halt when exceptions are raised ! * There is a menu entry in the debug perspective and a toolbar button in the breakpoint view which starts the Catchpoint dialog ! * The catchpoint dialog allows to add a ruby exception breakpoint ! * There can be at most one exception breakpoint; the breakpoint can be enabled, disabled and removed in the breakpoint view * Added outline support for aliasing methods using the format 'alias :new_method :old_method' * Fixed bug where current visibility was never reset when opening a new class * Ruby Search ! Changes merged from SRB 0.6.1: * SRB_0-6-1_1: Enable/Disable breakpoints, move breakpoints --- 1,20 ---- Changes since 0.6.0: ! * Debugger ! * Multiple debugger session possible because a free port will be used for the debugger communication. The port is written to a ! temporary file and conveyed to the ruby process with "-r<tmpFile>". The fixed port used in the past (1098) is still the default ! port in the case that a temporary file can not be created ! * Catchpoints: ! * The default was to halt at every type of StandardError, the new default is *not* to halt when exceptions are raised ! * There is a menu entry in the debug perspective and a toolbar button in the breakpoint view which starts the Catchpoint dialog ! * The catchpoint dialog allows to add a ruby exception breakpoint ! * There can be at most one exception breakpoint; the breakpoint can be enabled, disabled and removed in the breakpoint view * Added outline support for aliasing methods using the format 'alias :new_method :old_method' * Fixed bug where current visibility was never reset when opening a new class * Ruby Search ! * Fixed arguments in alias template to refer to methods in ocrrect order (first arg is new name, second is old) ! * Syntax Highlighting ! * Added ability to distinctly color characters ! * Added ability to distinctly color Fixnums (numbers) ! * Added ability to distinctly color Symbols Changes merged from SRB 0.6.1: * SRB_0-6-1_1: Enable/Disable breakpoints, move breakpoints |
|
From: Christopher W. <caw...@us...> - 2005-12-02 16:18:33
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21995/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java Log Message: Allow distinct syntax highlighting of symbols Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** TextEditorPreferencePage2.java 2 Dec 2005 02:56:04 -0000 1.18 --- TextEditorPreferencePage2.java 2 Dec 2005 16:18:11 -0000 1.19 *************** *** 74,77 **** --- 74,78 ---- IRubyColorConstants.RUBY_FIXNUM, IRubyColorConstants.RUBY_CHARACTER, + IRubyColorConstants.RUBY_SYMBOL, IRubyColorConstants.RUBY_DEFAULT }; |
|
From: Christopher W. <caw...@us...> - 2005-12-02 16:18:20
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21995/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCodeScanner.java CharacterRule.java Added Files: SymbolRule.java SingleCharacterPrefixRule.java Log Message: Allow distinct syntax highlighting of symbols --- NEW FILE: SingleCharacterPrefixRule.java --- package org.rubypeople.rdt.internal.ui.text.ruby; import org.eclipse.jface.text.Assert; import org.eclipse.jface.text.rules.ICharacterScanner; import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.IToken; import org.eclipse.jface.text.rules.Token; /** * This is a base class for recognizing tokens where a single character prefix * can determine if the word is of a particular token type. The token ends at * EOF, EOL or whitespace. * * @author cawilliams * */ public class SingleCharacterPrefixRule implements IRule { protected char fPrefix; protected IToken fToken; protected int fMinLength; protected int fMaxLength; public SingleCharacterPrefixRule(char prefix, IToken token, int minLength, int maxLength) { fPrefix = prefix; Assert.isNotNull(token); fToken = token; Assert.isLegal(minLength >= 1); fMinLength = minLength; Assert.isLegal(maxLength >= 1); fMaxLength = maxLength; } public IToken evaluate(ICharacterScanner scanner) { int c = scanner.read(); int length = 1; if (((char) c) == fPrefix) { // Now read until we hit EOF, EOL or whitespace while (true) { c = scanner.read(); if (c == ICharacterScanner.EOF || Character.isWhitespace((char) c)) { scanner.unread(); if (!lengthInRange(length)) return Token.UNDEFINED; return fToken; } length++; } } scanner.unread(); return Token.UNDEFINED; } /** * Determine if the length of the token is valid. * * @param length * @return */ protected boolean lengthInRange(int length) { return (length >= fMinLength) && (length <= fMaxLength); } } --- NEW FILE: SymbolRule.java --- package org.rubypeople.rdt.internal.ui.text.ruby; import org.eclipse.jface.text.rules.IToken; /** * A rule which will return the given Token for Ruby symbols. * * @author cawilliams * */ public class SymbolRule extends SingleCharacterPrefixRule { private static final char PREFIX = ':'; public SymbolRule(IToken token) { super(PREFIX, token, 2, Integer.MAX_VALUE); } } Index: CharacterRule.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/CharacterRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CharacterRule.java 2 Dec 2005 02:56:05 -0000 1.1 --- CharacterRule.java 2 Dec 2005 16:18:11 -0000 1.2 *************** *** 1,48 **** package org.rubypeople.rdt.internal.ui.text.ruby; - import org.eclipse.jface.text.Assert; - import org.eclipse.jface.text.rules.ICharacterScanner; - import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.IToken; - import org.eclipse.jface.text.rules.Token; - - public class CharacterRule implements IRule { - - /** The token to be returned when this rule is successful */ - protected IToken fToken; ! /** ! * Creates a rule which will return the specified token when a numerical ! * sequence is detected. ! * ! * @param token ! * the token to be returned ! */ ! public CharacterRule(IToken token) { ! Assert.isNotNull(token); ! fToken = token; ! } ! ! /* ! * @see IRule#evaluate(ICharacterScanner) ! */ ! public IToken evaluate(ICharacterScanner scanner) { ! int c = scanner.read(); ! if (((char) c) == '?') { ! c = scanner.read(); ! if (c == ICharacterScanner.EOF) { ! scanner.unread(); ! return Token.UNDEFINED; ! } ! int d = scanner.read(); ! if (!Character.isWhitespace((char) c) && Character.isWhitespace((char) d)) { ! scanner.unread(); ! return fToken; ! } ! } ! scanner.unread(); ! return Token.UNDEFINED; ! } } --- 1,20 ---- package org.rubypeople.rdt.internal.ui.text.ruby; import org.eclipse.jface.text.rules.IToken; ! public class CharacterRule extends SingleCharacterPrefixRule { ! private static final char PREFIX = '?'; ! private static final int WORD_LENGTH = 2; ! /** ! * Creates a rule which will return the specified token when a character ! * sequence is detected. ! * ! * @param token ! * the token to be returned ! */ ! public CharacterRule(IToken token) { ! super(PREFIX, token, WORD_LENGTH, 2); ! } } 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.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RubyCodeScanner.java 2 Dec 2005 02:56:05 -0000 1.8 --- RubyCodeScanner.java 2 Dec 2005 16:18:11 -0000 1.9 *************** *** 20,24 **** private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT, ! IRubyColorConstants.RUBY_FIXNUM, IRubyColorConstants.RUBY_CHARACTER // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, --- 20,25 ---- private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT, ! IRubyColorConstants.RUBY_FIXNUM, IRubyColorConstants.RUBY_CHARACTER, ! IRubyColorConstants.RUBY_SYMBOL // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, *************** *** 55,58 **** --- 56,62 ---- IToken fixnumToken = getToken(IRubyColorConstants.RUBY_FIXNUM); rules.add(new NumberRule(fixnumToken)); + + rules.add(new SymbolRule( + getToken(IRubyColorConstants.RUBY_SYMBOL))); IWordDetector wordDetector = new RubyWordDetector(); |
|
From: Christopher W. <caw...@us...> - 2005-12-02 16:18:19
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21995/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.properties RubyPlugin.java Log Message: Allow distinct syntax highlighting of symbols Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RubyPlugin.java 2 Dec 2005 02:56:05 -0000 1.19 --- RubyPlugin.java 2 Dec 2005 16:18:11 -0000 1.20 *************** *** 289,292 **** --- 289,295 ---- store.setDefault(RUBY_CHARACTER + PreferenceConstants.EDITOR_BOLD_SUFFIX, true); store.setDefault(RUBY_CHARACTER + PreferenceConstants.EDITOR_ITALIC_SUFFIX, true); + PreferenceConverter.setDefault(store, RUBY_SYMBOL, new RGB(255, 64, 64)); + store.setDefault(RUBY_SYMBOL + PreferenceConstants.EDITOR_BOLD_SUFFIX, true); + store.setDefault(RUBY_SYMBOL + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); PreferenceConverter.setDefault(store, RUBY_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(RUBY_MULTI_LINE_COMMENT + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RubyUIMessages.properties 2 Dec 2005 02:56:04 -0000 1.10 --- RubyUIMessages.properties 2 Dec 2005 16:18:11 -0000 1.11 *************** *** 62,65 **** --- 62,66 ---- RubyEditorPropertyPage.color_ruby_fixnum=Fixnums RubyEditorPropertyPage.color_ruby_character=Character Values + RubyEditorPropertyPage.color_ruby_symbol=Symbols RubyEditorPropertyPage.indentation=Characters per indentation level: RubyEditorPropertyPage.useTab=Use tab (if disabled, typed tabs are also converted to spaces) |
|
From: Christopher W. <caw...@us...> - 2005-12-02 16:18:19
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21995/src/org/rubypeople/rdt/internal/ui/text Modified Files: IRubyColorConstants.java Log Message: Allow distinct syntax highlighting of symbols Index: IRubyColorConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IRubyColorConstants.java 2 Dec 2005 02:56:04 -0000 1.5 --- IRubyColorConstants.java 2 Dec 2005 16:18:11 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- public static final String RUBY_FIXNUM = RUBY_COLOR_PREFIX + "fixnum"; public static final String RUBY_CHARACTER = RUBY_COLOR_PREFIX + "character"; + public static final String RUBY_SYMBOL = RUBY_COLOR_PREFIX + "symbol"; public static final String RUBY_MULTI_LINE_COMMENT = RUBY_COLOR_PREFIX + "multiline_comment"; |
|
From: Christopher W. <caw...@us...> - 2005-12-02 15:44:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14964/templates Modified Files: rdt.xml Log Message: fix template for alias - args should be in order of new method then old, not vice-versa Index: rdt.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/templates/rdt.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rdt.xml 26 Nov 2004 18:57:26 -0000 1.1 --- rdt.xml 2 Dec 2005 15:44:08 -0000 1.2 *************** *** 167,171 **** description="%aliasTemplate1.description" id="org.rubypeople.rdt.ui.templates.alias1" ! name="alias">alias ${old} ${new}</template> <template --- 167,171 ---- description="%aliasTemplate1.description" id="org.rubypeople.rdt.ui.templates.alias1" ! name="alias">alias :${new_method} :${old_method}</template> <template |
|
From: Christopher W. <caw...@us...> - 2005-12-02 02:56:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29944/src/org/rubypeople/rdt/internal/ui Modified Files: RubyUIMessages.properties RubyPlugin.java Log Message: For syntax highlighting: color Fixnums and characters distinctly Index: RubyPlugin.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyPlugin.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RubyPlugin.java 20 Nov 2005 16:39:39 -0000 1.18 --- RubyPlugin.java 2 Dec 2005 02:56:05 -0000 1.19 *************** *** 282,286 **** PreferenceConverter.setDefault(store, RUBY_COMMAND, new RGB(0, 128, 128)); store.setDefault(RUBY_COMMAND + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); ! store.setDefault(RUBY_COMMAND + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); PreferenceConverter.setDefault(store, RUBY_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(RUBY_MULTI_LINE_COMMENT + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); --- 282,292 ---- PreferenceConverter.setDefault(store, RUBY_COMMAND, new RGB(0, 128, 128)); store.setDefault(RUBY_COMMAND + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); ! store.setDefault(RUBY_COMMAND + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); ! PreferenceConverter.setDefault(store, RUBY_FIXNUM, new RGB(0, 128, 255)); ! store.setDefault(RUBY_FIXNUM + PreferenceConstants.EDITOR_BOLD_SUFFIX, true); ! store.setDefault(RUBY_FIXNUM + PreferenceConstants.EDITOR_ITALIC_SUFFIX, false); ! PreferenceConverter.setDefault(store, RUBY_CHARACTER, new RGB(255, 128, 128)); ! store.setDefault(RUBY_CHARACTER + PreferenceConstants.EDITOR_BOLD_SUFFIX, true); ! store.setDefault(RUBY_CHARACTER + PreferenceConstants.EDITOR_ITALIC_SUFFIX, true); PreferenceConverter.setDefault(store, RUBY_MULTI_LINE_COMMENT, new RGB(63, 127, 95)); store.setDefault(RUBY_MULTI_LINE_COMMENT + PreferenceConstants.EDITOR_BOLD_SUFFIX, false); Index: RubyUIMessages.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/RubyUIMessages.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RubyUIMessages.properties 24 Oct 2005 22:57:42 -0000 1.9 --- RubyUIMessages.properties 2 Dec 2005 02:56:04 -0000 1.10 *************** *** 60,63 **** --- 60,65 ---- RubyEditorPropertyPage.color_ruby_regexp=Regular Expressions RubyEditorPropertyPage.color_ruby_command=Shell Commands + RubyEditorPropertyPage.color_ruby_fixnum=Fixnums + RubyEditorPropertyPage.color_ruby_character=Character Values RubyEditorPropertyPage.indentation=Characters per indentation level: RubyEditorPropertyPage.useTab=Use tab (if disabled, typed tabs are also converted to spaces) |
|
From: Christopher W. <caw...@us...> - 2005-12-02 02:56:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29944/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCodeScanner.java Added Files: CharacterRule.java Log Message: For syntax highlighting: color Fixnums and characters distinctly --- NEW FILE: CharacterRule.java --- package org.rubypeople.rdt.internal.ui.text.ruby; import org.eclipse.jface.text.Assert; import org.eclipse.jface.text.rules.ICharacterScanner; import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.IToken; import org.eclipse.jface.text.rules.Token; public class CharacterRule implements IRule { /** The token to be returned when this rule is successful */ protected IToken fToken; /** * Creates a rule which will return the specified token when a numerical * sequence is detected. * * @param token * the token to be returned */ public CharacterRule(IToken token) { Assert.isNotNull(token); fToken = token; } /* * @see IRule#evaluate(ICharacterScanner) */ public IToken evaluate(ICharacterScanner scanner) { int c = scanner.read(); if (((char) c) == '?') { c = scanner.read(); if (c == ICharacterScanner.EOF) { scanner.unread(); return Token.UNDEFINED; } int d = scanner.read(); if (!Character.isWhitespace((char) c) && Character.isWhitespace((char) d)) { scanner.unread(); return fToken; } } scanner.unread(); return Token.UNDEFINED; } } 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.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RubyCodeScanner.java 1 Apr 2005 01:59:21 -0000 1.7 --- RubyCodeScanner.java 2 Dec 2005 02:56:05 -0000 1.8 *************** *** 6,9 **** --- 6,11 ---- import org.eclipse.jface.preference.IPreferenceStore; 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; *************** *** 16,20 **** protected String[] keywords; ! private static String[] fgTokenProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, --- 18,24 ---- protected String[] keywords; ! private static String[] fgTokenProperties = { ! IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_DEFAULT, ! IRubyColorConstants.RUBY_FIXNUM, IRubyColorConstants.RUBY_CHARACTER // TODO Add Ability to set colors for return and operators // IRubyColorConstants.RUBY_METHOD_NAME, *************** *** 46,52 **** List rules = new ArrayList(); IToken defToken = getToken(IRubyColorConstants.RUBY_DEFAULT); setDefaultReturnToken(defToken); ! WordRule wordRule = new WordRule(new RubyWordDetector(), defToken); rules.add(wordRule); --- 50,63 ---- List rules = new ArrayList(); + rules.add(new CharacterRule( + getToken(IRubyColorConstants.RUBY_CHARACTER))); + + IToken fixnumToken = getToken(IRubyColorConstants.RUBY_FIXNUM); + rules.add(new NumberRule(fixnumToken)); + + IWordDetector wordDetector = new RubyWordDetector(); IToken defToken = getToken(IRubyColorConstants.RUBY_DEFAULT); setDefaultReturnToken(defToken); ! WordRule wordRule = new WordRule(wordDetector, defToken); rules.add(wordRule); |
|
From: Christopher W. <caw...@us...> - 2005-12-02 02:56:15
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29944/src/org/rubypeople/rdt/internal/ui/text Modified Files: IRubyColorConstants.java Log Message: For syntax highlighting: color Fixnums and characters distinctly Index: IRubyColorConstants.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyColorConstants.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IRubyColorConstants.java 1 Apr 2005 02:11:42 -0000 1.4 --- IRubyColorConstants.java 2 Dec 2005 02:56:04 -0000 1.5 *************** *** 8,11 **** --- 8,13 ---- public static final String RUBY_REGEXP = RUBY_COLOR_PREFIX + "regexp"; public static final String RUBY_COMMAND = RUBY_COLOR_PREFIX + "command"; + public static final String RUBY_FIXNUM = RUBY_COLOR_PREFIX + "fixnum"; + public static final String RUBY_CHARACTER = RUBY_COLOR_PREFIX + "character"; public static final String RUBY_MULTI_LINE_COMMENT = RUBY_COLOR_PREFIX + "multiline_comment"; *************** *** 14,16 **** --- 16,19 ---- public static final String RUBY_CONTENT_ASSISTANT_BACKGROUND = RUBY_COLOR_PREFIX + "content_assistant_background"; + } |
|
From: Christopher W. <caw...@us...> - 2005-12-02 02:56:15
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29944/src/org/rubypeople/rdt/internal/ui/preferences Modified Files: TextEditorPreferencePage2.java Log Message: For syntax highlighting: color Fixnums and characters distinctly Index: TextEditorPreferencePage2.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/TextEditorPreferencePage2.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TextEditorPreferencePage2.java 2 Oct 2005 17:18:53 -0000 1.17 --- TextEditorPreferencePage2.java 2 Dec 2005 02:56:04 -0000 1.18 *************** *** 66,70 **** protected TextPropertyWidget[] textPropertyWidgets; protected Text indentationWidget; ! protected final String[] colorProperties = { IRubyColorConstants.RUBY_KEYWORD, IRubyColorConstants.RUBY_MULTI_LINE_COMMENT, IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT, IRubyColorConstants.RUBY_STRING, IRubyColorConstants.TASK_TAG, IRubyColorConstants.RUBY_REGEXP, IRubyColorConstants.RUBY_COMMAND, IRubyColorConstants.RUBY_DEFAULT}; //private final String[][] fAnnotationColorListModel; --- 66,78 ---- protected TextPropertyWidget[] textPropertyWidgets; protected Text indentationWidget; ! protected final String[] colorProperties = { ! IRubyColorConstants.RUBY_KEYWORD, ! IRubyColorConstants.RUBY_MULTI_LINE_COMMENT, ! IRubyColorConstants.RUBY_SINGLE_LINE_COMMENT, ! IRubyColorConstants.RUBY_STRING, IRubyColorConstants.TASK_TAG, ! IRubyColorConstants.RUBY_REGEXP, IRubyColorConstants.RUBY_COMMAND, ! IRubyColorConstants.RUBY_FIXNUM, ! IRubyColorConstants.RUBY_CHARACTER, ! IRubyColorConstants.RUBY_DEFAULT }; //private final String[][] fAnnotationColorListModel; |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:42:17
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6163/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCompletionProcessor.java Log Message: provide more completion proposals (add all Types in current project and referenced projects) 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.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RubyCompletionProcessor.java 29 Nov 2005 02:20:12 -0000 1.14 --- RubyCompletionProcessor.java 29 Nov 2005 19:42:03 -0000 1.15 *************** *** 4,7 **** --- 4,9 ---- import java.util.ArrayList; import java.util.Arrays; + import java.util.Collection; + import java.util.Iterator; import java.util.List; *************** *** 24,31 **** import org.rubypeople.rdt.core.IParent; import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.RubyModelException; - import org.rubypeople.rdt.internal.ui.RubyPluginImages; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.rubyeditor.templates.RubyFileContextType; import org.rubypeople.rdt.internal.ui.rubyeditor.templates.RubyTemplateAccess; --- 26,34 ---- import org.rubypeople.rdt.core.IParent; import org.rubypeople.rdt.core.IRubyElement; + import org.rubypeople.rdt.core.IRubyProject; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.RubyModelException; import org.rubypeople.rdt.internal.ui.RubyPlugin; + import org.rubypeople.rdt.internal.ui.RubyPluginImages; import org.rubypeople.rdt.internal.ui.rubyeditor.templates.RubyFileContextType; import org.rubypeople.rdt.internal.ui.rubyeditor.templates.RubyTemplateAccess; *************** *** 33,340 **** import org.rubypeople.rdt.ui.IWorkingCopyManager; ! public class RubyCompletionProcessor extends TemplateCompletionProcessor implements IContentAssistProcessor { ! private static String[] keywordProposals; ! protected IContextInformationValidator contextInformationValidator = new RubyContextInformationValidator(); ! private static String[] preDefinedGlobals = { "$!", "$@", "$_", "$.", "$&", "$n", "$~", "$=", "$/", "$\\", "$0", "$*", "$$", "$?", "$:"}; ! private static String[] globalContexts = { "error message", "position of an error occurrence", "latest read string by `gets'", "latest read number of line by interpreter", "latest matched string by the regexep.", "latest matched string by nth parentheses of regexp.", "data for latest matche for regexp", "whether or not case-sensitive in string matching", "input record separator", "output record separator", "the name of the ruby scpript file", "command line arguments for the ruby scpript", ! "PID for ruby interpreter", "status of the latest executed child process", "array of paths that ruby interpreter searches for files"}; ! // FIXME This is an ugly hack, just hard-coding method names ! // FIXME Create a model for Ruby core in our Ruby Model! ! private static String[] KERNEL_METHODS = {"abort", "at_exit", "autoload", "binding", ! "block_given?", "callcc", "caller", "catch", "chomp", ! "chomp!", "chop", "chop!", "eval", "exec", "exit", ! "exit!", "fail", "fork", "format", "gets", "global_variables", ! "gsub", "gsub!", "iterator?", "lambda", "load", "local_variables", ! "loop", "open", "p", "print", "printf", "proc", "putc", ! "puts", "raise", "rand", "readline", "readlines", "require", ! "scan", "select", "set_trace_func", "singleton_method_added", ! "sleep", "split", "sprintf", "srand", "sub", "sub!", "syscall", ! "system", "test", "throw", "trace_var", "trap", "untrace_var"}; ! ! /** ! * The prefix for the current content assist ! */ ! protected String currentPrefix = null; ! /** ! * Cursor position, counted from the beginning of the document. ! * <P> ! * The first position has index '0'. ! */ ! protected int cursorPosition = -1; ! /** ! * The text viewer. ! */ ! private ITextViewer viewer; ! private IWorkingCopyManager fManager; ! private IEditorPart fEditor; ! public RubyCompletionProcessor(IEditorPart editor) { ! super(); ! fEditor= editor; ! fManager= RubyPlugin.getDefault().getWorkingCopyManager(); ! } ! public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ! this.viewer = viewer; ! ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection(); ! cursorPosition = selection.getOffset() + selection.getLength(); ! ICompletionProposal[] normal = determineRubyElementProposals(viewer, documentOffset); ! ICompletionProposal[] templates = determineTemplateProposals(viewer, documentOffset); ! ICompletionProposal[] merged = merge(normal, templates); ! ICompletionProposal[] keywords = determineKeywordProposals(viewer, documentOffset); ! ICompletionProposal[] mergedTwo = merge(merged, keywords); ! return mergedTwo; ! } ! /** ! * @param arrayOne ! * @param arrayTwo ! * @return ! */ ! private ICompletionProposal[] merge(ICompletionProposal[] arrayOne, ICompletionProposal[] arrayTwo) { ! ICompletionProposal[] merged = new ICompletionProposal[arrayOne.length + arrayTwo.length]; ! System.arraycopy(arrayOne, 0, merged, 0, arrayOne.length); ! System.arraycopy(arrayTwo, 0, merged, arrayOne.length, arrayTwo.length); ! return merged; ! } ! /** ! * @param viewer ! * @param documentOffset ! * @return ! */ ! private ICompletionProposal[] determineRubyElementProposals(ITextViewer viewer, int documentOffset) { ! ArrayList completionProposals = new ArrayList(getDocumentsRubyElements()); ! completionProposals.addAll(addKernelMethods()); ! ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! // following the JDT convention, if there's no text already entered, ! // then don't suggest imported elements ! if (prefix.length() > 0) { ! // FIXME Add elements from required/loaded files! ! } ! ! ArrayList possibleProposals = new ArrayList(); ! for (int i = 0; i < completionProposals.size(); i++) { ! String proposal = (String) completionProposals.get(i); ! if (proposal.startsWith(prefix)) { ! String message = "{0}"; ! IContextInformation info = new ContextInformation(proposal, MessageFormat.format(message, new Object[] { proposal})); ! possibleProposals.add(new CompletionProposal(proposal.substring(prefix.length(), proposal.length()), documentOffset, 0, proposal.length() - prefix.length(), null, proposal, info, MessageFormat.format("Ruby keyword: {0}", new Object[] { proposal}))); ! } ! } ! ICompletionProposal[] result = new ICompletionProposal[possibleProposals.size()]; ! possibleProposals.toArray(result); ! return result; ! } ! private List addKernelMethods() { ! List kernelProposals = new ArrayList(); ! for (int i = 0; i < KERNEL_METHODS.length; i++) { ! kernelProposals.add(KERNEL_METHODS[i]); ! } ! return kernelProposals; ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getImage(org.eclipse.jface.text.templates.Template) ! */ ! protected Image getImage(Template template) { ! return RubyPluginImages.get(RubyPluginImages.IMG_TEMPLATE_PROPOSAL); ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextType(org.eclipse.jface.text.ITextViewer, ! * org.eclipse.jface.text.IRegion) ! */ ! protected TemplateContextType getContextType(ITextViewer textViewer, IRegion region) { ! return RubyTemplateAccess.getDefault().getContextTypeRegistry().getContextType(RubyFileContextType.RUBYFILE_CONTEXT_TYPE); ! } ! /** ! * @return ! */ ! private ICompletionProposal[] determineTemplateProposals(ITextViewer refViewer, int documentOffset) { ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! ICompletionProposal[] matchingTemplateProposals; ! if (prefix.length() == 0) { ! matchingTemplateProposals = super.computeCompletionProposals(refViewer, documentOffset); ! } else { ! ICompletionProposal[] templateProposals = super.computeCompletionProposals(refViewer, documentOffset); ! List templateProposalList = new ArrayList(templateProposals.length); ! for (int i = 0; i < templateProposals.length; i++) { ! if (templateProposals[i].getDisplayString().toLowerCase().startsWith(prefix)) { ! templateProposalList.add(templateProposals[i]); ! } ! } ! matchingTemplateProposals = (ICompletionProposal[]) templateProposalList.toArray(new ICompletionProposal[templateProposalList.size()]); ! } ! return matchingTemplateProposals; ! } ! /** ! * @param proposal ! * @return ! */ ! private String getContext(String proposal) { ! for (int i = 0; i < preDefinedGlobals.length; i++) { ! if (proposal.equals(preDefinedGlobals[i])) return globalContexts[i]; ! } ! return ""; ! } ! /** ! * @param proposal ! * @return ! */ ! private boolean isPredefinedGlobal(String proposal) { ! for (int i = 0; i < preDefinedGlobals.length; i++) { ! if (proposal.equals(preDefinedGlobals[i])) return true; ! } ! return false; ! } ! private List getDocumentsRubyElements() { ! IRubyScript script = fManager.getWorkingCopy(fEditor.getEditorInput()); ! // FIXME Get only the elements in the current scope! ! return getElements(script); ! } ! /** ! * @param script ! * @return ! */ ! private List getElements(IParent element) { ! List suggestions = new ArrayList(); ! try { ! IRubyElement[] elements = element.getChildren(); ! for (int i = 0; i < elements.length; i++) { ! IRubyElement child = elements[i]; ! suggestions.add(child.getElementName()); ! if(child instanceof IParent) ! suggestions.addAll(getElements((IParent)child)); ! } ! } catch (RubyModelException e) { ! e.printStackTrace(); ! } ! return suggestions; ! } ! private ICompletionProposal[] determineKeywordProposals(ITextViewer viewer, int documentOffset) { ! initKeywordProposals(); ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! // following the JDT convention, if there's no text already entered, ! // then don't suggest keywords ! if (prefix.length() < 1) { return new ICompletionProposal[0]; } ! List completionProposals = Arrays.asList(keywordProposals); ! // FIXME Refactor to combine the copied code in ! // determineRubyElementProposals ! List possibleProposals = new ArrayList(); ! for (int i = 0; i < completionProposals.size(); i++) { ! String proposal = (String) completionProposals.get(i); ! if (proposal.startsWith(prefix)) { ! String message; ! if (isPredefinedGlobal(proposal)) { ! message = "{0} " + getContext(proposal); ! } else { ! message = "{0}"; ! } ! IContextInformation info = new ContextInformation(proposal, MessageFormat.format(message, new Object[] { proposal})); ! possibleProposals.add(new CompletionProposal(proposal.substring(prefix.length(), proposal.length()), documentOffset, 0, proposal.length() - prefix.length(), null, proposal, info, MessageFormat.format("Ruby keyword: {0}", new Object[] { proposal}))); ! } ! } ! ICompletionProposal[] result = new ICompletionProposal[possibleProposals.size()]; ! possibleProposals.toArray(result); ! return result; ! } ! /** ! * ! */ ! private void initKeywordProposals() { ! if (keywordProposals == null) { ! String[] keywords = RubyTextTools.getKeyWords(); ! keywordProposals = new String[keywords.length + preDefinedGlobals.length]; ! System.arraycopy(keywords, 0, keywordProposals, 0, keywords.length); ! System.arraycopy(preDefinedGlobals, 0, keywordProposals, keywords.length, preDefinedGlobals.length); ! } ! } ! protected String getCurrentPrefix(String documentString, int documentOffset) { ! int tokenLength = 0; ! while ((documentOffset - tokenLength > 0) && !Character.isWhitespace(documentString.charAt(documentOffset - tokenLength - 1))) ! tokenLength++; ! return documentString.substring((documentOffset - tokenLength), documentOffset); ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getTemplates(java.lang.String) ! */ ! protected Template[] getTemplates(String contextTypeId) { ! return RubyTemplateAccess.getDefault().getTemplateStore().getTemplates(); ! } ! public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) { ! return null; ! } ! public char[] getCompletionProposalAutoActivationCharacters() { ! return null; ! } ! public char[] getContextInformationAutoActivationCharacters() { ! return new char[] { '#'}; ! } ! public IContextInformationValidator getContextInformationValidator() { ! return contextInformationValidator; ! } ! public String getErrorMessage() { ! return null; ! } ! protected class RubyContextInformationValidator implements IContextInformationValidator, IContextInformationPresenter { ! protected int installDocumentPosition; ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#install(IContextInformation, ! * ITextViewer, int) ! */ ! public void install(IContextInformation info, ITextViewer viewer, int documentPosition) { ! installDocumentPosition = documentPosition; ! } ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#isContextInformationValid(int) ! */ ! public boolean isContextInformationValid(int documentPosition) { ! return Math.abs(installDocumentPosition - documentPosition) < 1; ! } ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#updatePresentation(int, ! * TextPresentation) ! */ ! public boolean updatePresentation(int documentPosition, TextPresentation presentation) { ! return false; ! } ! } } \ No newline at end of file --- 36,405 ---- import org.rubypeople.rdt.ui.IWorkingCopyManager; ! public class RubyCompletionProcessor extends TemplateCompletionProcessor implements ! IContentAssistProcessor { ! private static String[] keywordProposals; ! protected IContextInformationValidator contextInformationValidator = new RubyContextInformationValidator(); ! private static String[] preDefinedGlobals = { "$!", "$@", "$_", "$.", "$&", "$n", "$~", "$=", ! "$/", "$\\", "$0", "$*", "$$", "$?", "$:"}; ! private static String[] globalContexts = { "error message", "position of an error occurrence", ! "latest read string by `gets'", "latest read number of line by interpreter", ! "latest matched string by the regexep.", ! "latest matched string by nth parentheses of regexp.", ! "data for latest matche for regexp", ! "whether or not case-sensitive in string matching", "input record separator", ! "output record separator", "the name of the ruby scpript file", ! "command line arguments for the ruby scpript", "PID for ruby interpreter", ! "status of the latest executed child process", ! "array of paths that ruby interpreter searches for files"}; ! // FIXME This is an ugly hack, just hard-coding method names ! // FIXME Create a model for Ruby core in our Ruby Model! ! private static String[] KERNEL_METHODS = { "abort", "at_exit", "autoload", "binding", ! "block_given?", "callcc", "caller", "catch", "chomp", "chomp!", "chop", "chop!", ! "eval", "exec", "exit", "exit!", "fail", "fork", "format", "gets", "global_variables", ! "gsub", "gsub!", "iterator?", "lambda", "load", "local_variables", "loop", "open", "p", ! "print", "printf", "proc", "putc", "puts", "raise", "rand", "readline", "readlines", ! "require", "scan", "select", "set_trace_func", "singleton_method_added", "sleep", ! "split", "sprintf", "srand", "sub", "sub!", "syscall", "system", "test", "throw", ! "trace_var", "trap", "untrace_var"}; ! /** ! * The prefix for the current content assist ! */ ! protected String currentPrefix = null; ! /** ! * Cursor position, counted from the beginning of the document. ! * <P> ! * The first position has index '0'. ! */ ! protected int cursorPosition = -1; ! /** ! * The text viewer. ! */ ! private ITextViewer viewer; ! private IWorkingCopyManager fManager; ! private IEditorPart fEditor; ! public RubyCompletionProcessor(IEditorPart editor) { ! super(); ! fEditor = editor; ! fManager = RubyPlugin.getDefault().getWorkingCopyManager(); ! } ! public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ! this.viewer = viewer; ! ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection(); ! cursorPosition = selection.getOffset() + selection.getLength(); ! ICompletionProposal[] normal = determineRubyElementProposals(viewer, documentOffset); ! ICompletionProposal[] templates = determineTemplateProposals(viewer, documentOffset); ! ICompletionProposal[] merged = merge(normal, templates); ! ICompletionProposal[] keywords = determineKeywordProposals(viewer, documentOffset); ! ICompletionProposal[] mergedTwo = merge(merged, keywords); ! return mergedTwo; ! } ! /** ! * @param arrayOne ! * @param arrayTwo ! * @return ! */ ! private ICompletionProposal[] merge(ICompletionProposal[] arrayOne, ! ICompletionProposal[] arrayTwo) { ! ICompletionProposal[] merged = new ICompletionProposal[arrayOne.length + arrayTwo.length]; ! System.arraycopy(arrayOne, 0, merged, 0, arrayOne.length); ! System.arraycopy(arrayTwo, 0, merged, arrayOne.length, arrayTwo.length); ! return merged; ! } ! /** ! * @param viewer ! * @param documentOffset ! * @return ! */ ! private ICompletionProposal[] determineRubyElementProposals(ITextViewer viewer, ! int documentOffset) { ! Collection completionProposals = getDocumentsRubyElements(); ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! // following the JDT convention, if there's no text already entered, ! // then don't suggest imported elements ! if (prefix.length() > 0) { ! // FIXME Add elements from required/loaded files! ! } ! List possibleProposals = new ArrayList(); ! for (Iterator iter = completionProposals.iterator(); iter.hasNext();) { ! String proposal = (String) iter.next(); ! if (proposal.startsWith(prefix)) { ! String message = "{0}"; ! IContextInformation info = new ContextInformation(proposal, MessageFormat.format( ! message, new Object[] { proposal})); ! possibleProposals.add(new CompletionProposal(proposal.substring(prefix.length(), ! proposal.length()), documentOffset, 0, proposal.length() - prefix.length(), ! null, proposal, info, MessageFormat.format("Ruby keyword: {0}", ! new Object[] { proposal}))); ! } ! } ! ICompletionProposal[] result = new ICompletionProposal[possibleProposals.size()]; ! possibleProposals.toArray(result); ! return result; ! } ! private Collection addKernelMethods() { ! Collection kernelProposals = new ArrayList(); ! for (int i = 0; i < KERNEL_METHODS.length; i++) { ! kernelProposals.add(KERNEL_METHODS[i]); ! } ! return kernelProposals; ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getImage(org.eclipse.jface.text.templates.Template) ! */ ! protected Image getImage(Template template) { ! return RubyPluginImages.get(RubyPluginImages.IMG_TEMPLATE_PROPOSAL); ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextType(org.eclipse.jface.text.ITextViewer, ! * org.eclipse.jface.text.IRegion) ! */ ! protected TemplateContextType getContextType(ITextViewer textViewer, IRegion region) { ! return RubyTemplateAccess.getDefault().getContextTypeRegistry().getContextType( ! RubyFileContextType.RUBYFILE_CONTEXT_TYPE); ! } ! /** ! * @return ! */ ! private ICompletionProposal[] determineTemplateProposals(ITextViewer refViewer, ! int documentOffset) { ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! ICompletionProposal[] matchingTemplateProposals; ! if (prefix.length() == 0) { ! matchingTemplateProposals = super.computeCompletionProposals(refViewer, documentOffset); ! } else { ! ICompletionProposal[] templateProposals = super.computeCompletionProposals(refViewer, ! documentOffset); ! List templateProposalList = new ArrayList(templateProposals.length); ! for (int i = 0; i < templateProposals.length; i++) { ! if (templateProposals[i].getDisplayString().toLowerCase().startsWith(prefix)) { ! templateProposalList.add(templateProposals[i]); ! } ! } ! matchingTemplateProposals = (ICompletionProposal[]) templateProposalList ! .toArray(new ICompletionProposal[templateProposalList.size()]); ! } ! return matchingTemplateProposals; ! } ! /** ! * @param proposal ! * @return ! */ ! private String getContext(String proposal) { ! for (int i = 0; i < preDefinedGlobals.length; i++) { ! if (proposal.equals(preDefinedGlobals[i])) return globalContexts[i]; ! } ! return ""; ! } ! /** ! * @param proposal ! * @return ! */ ! private boolean isPredefinedGlobal(String proposal) { ! for (int i = 0; i < preDefinedGlobals.length; i++) { ! if (proposal.equals(preDefinedGlobals[i])) return true; ! } ! return false; ! } ! /** ! * Gets all the distinct elements in the current RubyScript ! * ! * @return a List of the names of all the elements in the current RubyScript ! */ ! private Collection getDocumentsRubyElements() { ! IRubyScript script = fManager.getWorkingCopy(fEditor.getEditorInput()); ! // FIXME Get only the elements in the current scope! ! Collection elements = getElements(script); ! IRubyProject project = script.getRubyProject(); ! // Add all the classes and modules in the project ! elements.addAll(addClassesAndModulesInProject(project)); ! // Add all the classes and modules in referenced projects ! for (Iterator iter = project.getReferencedProjects().iterator(); iter.hasNext();) { ! elements.addAll(addClassesAndModulesInProject(((IRubyProject) iter.next()))); ! } ! // TODO Add all the methods defined in included modules for the class ! // TODO Add all the methods defined in superclasses for the class/module ! // always add Kernel methods ! elements.addAll(addKernelMethods()); ! return elements; ! } ! private Collection addClassesAndModulesInProject(IRubyProject project) { ! return getElementsOfType(project, new int[] { IRubyElement.TYPE}); ! } ! private Collection getElementsOfType(IParent element, int[] types) { ! Collection suggestions = new ArrayList(); ! try { ! IRubyElement[] elements = element.getChildren(); ! if (elements == null) return suggestions; ! for (int x = 0; x < elements.length; x++) { ! IRubyElement child = elements[x]; ! for (int i = 0; i < types.length; i++) { ! if (child.getElementType() == types[i]) { ! suggestions.add(child.getElementName()); ! break; ! } ! } ! if (child instanceof IParent) ! suggestions.addAll(getElementsOfType((IParent) child, types)); ! } ! } catch (RubyModelException e) { ! e.printStackTrace(); ! } ! return suggestions; ! } ! /** ! * @param script ! * @return ! */ ! private Collection getElements(IParent element) { ! return getElementsOfType(element, new int[] { IRubyElement.TYPE, IRubyElement.METHOD, ! IRubyElement.GLOBAL, IRubyElement.CONSTANT, IRubyElement.CLASS_VAR, ! IRubyElement.INSTANCE_VAR}); ! } ! private ICompletionProposal[] determineKeywordProposals(ITextViewer viewer, int documentOffset) { ! initKeywordProposals(); ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); ! // following the JDT convention, if there's no text already entered, ! // then don't suggest keywords ! if (prefix.length() < 1) { return new ICompletionProposal[0]; } ! List completionProposals = Arrays.asList(keywordProposals); ! // FIXME Refactor to combine the copied code in ! // determineRubyElementProposals ! List possibleProposals = new ArrayList(); ! for (int i = 0; i < completionProposals.size(); i++) { ! String proposal = (String) completionProposals.get(i); ! if (proposal.startsWith(prefix)) { ! String message; ! if (isPredefinedGlobal(proposal)) { ! message = "{0} " + getContext(proposal); ! } else { ! message = "{0}"; ! } ! IContextInformation info = new ContextInformation(proposal, MessageFormat.format( ! message, new Object[] { proposal})); ! possibleProposals.add(new CompletionProposal(proposal.substring(prefix.length(), ! proposal.length()), documentOffset, 0, proposal.length() - prefix.length(), ! null, proposal, info, MessageFormat.format("Ruby keyword: {0}", ! new Object[] { proposal}))); ! } ! } ! ICompletionProposal[] result = new ICompletionProposal[possibleProposals.size()]; ! possibleProposals.toArray(result); ! return result; ! } ! /** ! * ! */ ! private void initKeywordProposals() { ! if (keywordProposals == null) { ! String[] keywords = RubyTextTools.getKeyWords(); ! keywordProposals = new String[keywords.length + preDefinedGlobals.length]; ! System.arraycopy(keywords, 0, keywordProposals, 0, keywords.length); ! System.arraycopy(preDefinedGlobals, 0, keywordProposals, keywords.length, ! preDefinedGlobals.length); ! } ! } ! protected String getCurrentPrefix(String documentString, int documentOffset) { ! int tokenLength = 0; ! while ((documentOffset - tokenLength > 0) ! && !Character.isWhitespace(documentString.charAt(documentOffset - tokenLength - 1))) ! tokenLength++; ! return documentString.substring((documentOffset - tokenLength), documentOffset); ! } ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getTemplates(java.lang.String) ! */ ! protected Template[] getTemplates(String contextTypeId) { ! return RubyTemplateAccess.getDefault().getTemplateStore().getTemplates(); ! } ! ! public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) { ! return null; ! } ! ! public char[] getCompletionProposalAutoActivationCharacters() { ! return null; ! } ! ! public char[] getContextInformationAutoActivationCharacters() { ! return new char[] { '#'}; ! } ! ! public IContextInformationValidator getContextInformationValidator() { ! return contextInformationValidator; ! } ! ! public String getErrorMessage() { ! return null; ! } ! ! protected class RubyContextInformationValidator implements IContextInformationValidator, ! IContextInformationPresenter { ! ! protected int installDocumentPosition; ! ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#install(IContextInformation, ! * ITextViewer, int) ! */ ! public void install(IContextInformation info, ITextViewer viewer, int documentPosition) { ! installDocumentPosition = documentPosition; ! } ! ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationValidator#isContextInformationValid(int) ! */ ! public boolean isContextInformationValid(int documentPosition) { ! return Math.abs(installDocumentPosition - documentPosition) < 1; ! } ! ! /** ! * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#updatePresentation(int, ! * TextPresentation) ! */ ! public boolean updatePresentation(int documentPosition, TextPresentation presentation) { ! return false; ! } ! } } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:40:53
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5907/src/org/rubypeople/rdt/internal/core Modified Files: RubyProject.java Log Message: implement the buildStructure properly so we actually add ruby scripts as children to the project Index: RubyProject.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RubyProject.java 1 Oct 2005 23:11:12 -0000 1.15 --- RubyProject.java 29 Nov 2005 19:40:41 -0000 1.16 *************** *** 16,22 **** import org.eclipse.core.resources.IProjectNature; import org.eclipse.core.resources.IResource; - import org.eclipse.core.resources.IWorkspace; - import org.eclipse.core.resources.IWorkspaceRoot; - import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; --- 16,19 ---- *************** *** 30,33 **** --- 27,31 ---- import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.core.RubyModelException; + import org.rubypeople.rdt.internal.core.builder.ProjectFileFinder; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; *************** *** 39,509 **** public class RubyProject extends Openable implements IProjectNature, IRubyElement, IRubyProject { ! protected IProject project; ! protected List loadPathEntries; ! protected boolean scratched; ! /* ! * Value of project's resolved loadpath while it is being resolved ! */ ! public RubyProject() { ! super(null); ! } ! /** ! * @param aProject ! */ ! public RubyProject(IProject aProject, RubyElement parent) { ! super(parent); ! setProject(aProject); ! } ! /** ! * Configure the project with Java nature. ! */ ! public void configure() throws CoreException { - // register Ruby builder - addToBuildSpec(RubyCore.BUILDER_ID); - } - public boolean upgrade() throws CoreException { return addToBuildSpec(RubyCore.BUILDER_ID); } - /** - * Adds a builder to the build spec for the given project. - */ - protected boolean addToBuildSpec(String builderID) throws CoreException { ! IProjectDescription description = this.project.getDescription(); ! int commandIndex = getRubyCommandIndex(description.getBuildSpec()); ! if (commandIndex == -1) { ! // Add a Java command to the build spec ! ICommand command = description.newCommand(); ! command.setBuilderName(builderID); ! setRubyCommand(description, command); return true; ! } return false; ! } ! ! /** ! * Find the specific Ruby command amongst the given build spec ! * and return its index or -1 if not found. ! */ ! private int getRubyCommandIndex(ICommand[] buildSpec) { ! for (int i = 0; i < buildSpec.length; ++i) { ! if (buildSpec[i].getBuilderName().equals(RubyCore.BUILDER_ID)) { ! return i; ! } ! } ! return -1; ! } ! ! /** ! * Update the Ruby command in the build spec (replace existing one if present, ! * add one first if none). ! */ ! private void setRubyCommand( ! IProjectDescription description, ! ICommand newCommand) ! throws CoreException { ! ICommand[] oldBuildSpec = description.getBuildSpec(); ! int oldRubyCommandIndex = getRubyCommandIndex(oldBuildSpec); ! ICommand[] newCommands; ! if (oldRubyCommandIndex == -1) { ! // Add a Ruby build spec before other builders (1FWJK7I) ! newCommands = new ICommand[oldBuildSpec.length + 1]; ! System.arraycopy(oldBuildSpec, 0, newCommands, 1, oldBuildSpec.length); ! newCommands[0] = newCommand; ! } else { ! oldBuildSpec[oldRubyCommandIndex] = newCommand; ! newCommands = oldBuildSpec; ! } ! // Commit the spec change into the project ! description.setBuildSpec(newCommands); ! this.project.setDescription(description, null); ! } ! /** ! /** ! * Removes the Java nature from the project. ! */ ! public void deconfigure() throws CoreException { ! // deregister Ruby builder ! removeFromBuildSpec(RubyCore.BUILDER_ID); ! } ! ! /** ! * Removes the given builder from the build spec for the given project. ! */ ! protected void removeFromBuildSpec(String builderID) throws CoreException { ! IProjectDescription description = this.project.getDescription(); ! ICommand[] commands = description.getBuildSpec(); ! for (int i = 0; i < commands.length; ++i) { ! if (commands[i].getBuilderName().equals(builderID)) { ! ICommand[] newCommands = new ICommand[commands.length - 1]; ! System.arraycopy(commands, 0, newCommands, 0, i); ! System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1); ! description.setBuildSpec(newCommands); ! this.project.setDescription(description, null); ! return; ! } ! } ! } ! /** ! * Returns true if this handle represents the same Ruby project as the given ! * handle. Two handles represent the same project if they are identical or ! * if they represent a project with the same underlying resource and ! * occurrence counts. ! * ! * @see RubyElement#equals(Object) ! */ ! public boolean equals(Object o) { ! if (this == o) return true; ! if (!(o instanceof RubyProject)) return false; ! RubyProject other = (RubyProject) o; ! return this.project.equals(other.getProject()); ! } ! public boolean exists() { ! return hasRubyNature(this.project); ! } ! public RubyModelManager.PerProjectInfo getPerProjectInfo() throws RubyModelException { ! return RubyModelManager.getRubyModelManager().getPerProjectInfoCheckExistence(this.project); ! } ! public IProject getProject() { ! return project; ! } ! /** ! * @see IRubyElement ! */ ! public IPath getPath() { ! return this.project.getFullPath(); ! } ! protected IProject getProject(String name) { ! return RubyCore.getWorkspace().getRoot().getProject(name); ! } ! public void setProject(IProject aProject) { ! project = aProject; ! } ! public IResource getResource() { ! return this.project; ! } ! public void addLoadPathEntry(IProject anotherRubyProject) { ! scratched = true; ! LoadPathEntry newEntry = new LoadPathEntry(anotherRubyProject); ! getLoadPathEntries().add(newEntry); ! } ! public void removeLoadPathEntry(IProject anotherRubyProject) { ! Iterator entries = getLoadPathEntries().iterator(); ! while (entries.hasNext()) { ! LoadPathEntry entry = (LoadPathEntry) entries.next(); ! if (entry.getEntryKind() == ILoadpathEntry.CPE_PROJECT && entry.getProject().getName().equals(anotherRubyProject.getName())) { ! getLoadPathEntries().remove(entry); ! scratched = true; ! break; ! } ! } ! } ! public List getLoadPathEntries() { ! if (loadPathEntries == null) { ! loadLoadPathEntries(); ! } ! return loadPathEntries; ! } ! public List getReferencedProjects() { ! List referencedProjects = new ArrayList(); ! Iterator iterator = getLoadPathEntries().iterator(); ! while (iterator.hasNext()) { ! LoadPathEntry pathEntry = (LoadPathEntry) iterator.next(); ! if (pathEntry.getEntryKind() == ILoadpathEntry.CPE_PROJECT) referencedProjects.add(pathEntry.getProject()); ! } ! return referencedProjects; ! } ! public String[] getRequiredProjectNames() throws RubyModelException { ! List prerequisites = new ArrayList(); ! // need resolution ! List entries = getLoadPathEntries(); ! for (Iterator iter = entries.iterator(); iter.hasNext();) { ! ILoadpathEntry entry = (ILoadpathEntry) iter.next(); ! if (entry.getEntryKind() == ILoadpathEntry.CPE_PROJECT) { ! prerequisites.add(entry.getPath().lastSegment()); ! } ! } ! int size = prerequisites.size(); ! if (size == 0) { return new String[0]; } ! String[] result = new String[size]; ! prerequisites.toArray(result); ! return result; ! } ! protected void loadLoadPathEntries() { ! loadPathEntries = new ArrayList(); ! IFile loadPathsFile = getLoadPathEntriesFile(); ! XMLReader reader = null; ! try { ! reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); ! reader.setContentHandler(getLoadPathEntriesContentHandler()); ! reader.parse(new InputSource(loadPathsFile.getContents())); ! } catch (Exception e) { ! // the file is nonextant or unreadable ! } ! } ! protected ContentHandler getLoadPathEntriesContentHandler() { ! return new ContentHandler() { ! public void characters(char[] arg0, int arg1, int arg2) throws SAXException {} ! public void endDocument() throws SAXException {} ! public void endElement(String arg0, String arg1, String arg2) throws SAXException {} ! public void endPrefixMapping(String arg0) throws SAXException {} ! public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException {} ! public void processingInstruction(String arg0, String arg1) throws SAXException {} ! public void setDocumentLocator(Locator arg0) {} ! public void skippedEntity(String arg0) throws SAXException {} ! public void startDocument() throws SAXException {} ! public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { ! if ("pathentry".equals(qName)) if ("project".equals(atts.getValue("type"))) { ! IPath referencedProjectPath = new Path(atts.getValue("path")); ! IProject referencedProject = getProject(referencedProjectPath.lastSegment()); ! loadPathEntries.add(new LoadPathEntry(referencedProject)); ! } ! } ! public void startPrefixMapping(String arg0, String arg1) throws SAXException {} ! }; ! } ! protected IFile getLoadPathEntriesFile() { ! return project.getFile(".loadpath"); ! } ! public void save() throws CoreException { ! if (scratched) { ! InputStream xmlPath = new ByteArrayInputStream(getLoadPathXML().getBytes()); ! IFile loadPathsFile = getLoadPathEntriesFile(); ! if (!loadPathsFile.exists()) ! loadPathsFile.create(xmlPath, true, null); ! else ! loadPathsFile.setContents(xmlPath, true, false, null); ! scratched = false; ! } ! } ! protected String getLoadPathXML() { ! StringBuffer buffer = new StringBuffer(); ! buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><loadpath>"); ! Iterator pathEntriesIterator = loadPathEntries.iterator(); ! while (pathEntriesIterator.hasNext()) { ! LoadPathEntry entry = (LoadPathEntry) pathEntriesIterator.next(); ! buffer.append(entry.toXML()); ! } ! buffer.append("</loadpath>"); ! return buffer.toString(); ! } ! /** ! * @see IRubyElement ! */ ! public IResource getUnderlyingResource() throws RubyModelException { ! if (!exists()) throw newNotPresentException(); ! return this.project; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#getElementName() ! */ ! public String getElementName() { ! return project.getName(); ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType() ! */ ! public int getElementType() { ! return IRubyElement.PROJECT; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#hasChildren() ! */ ! public boolean hasChildren() { ! return true; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#getParent() ! */ ! public IRubyElement getParent() { ! return null; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyProject#findType(java.lang.String) ! */ ! public IType findType(String fullyQualifiedName) { ! int index = fullyQualifiedName.lastIndexOf("::"); ! String className = null, packageName = null; ! if (index == -1) { ! packageName = ""; ! className = fullyQualifiedName; ! } else { ! packageName = fullyQualifiedName.substring(0, index); ! className = fullyQualifiedName.substring(index + 2); ! } ! // FIXME Handle the namespaces properly. we ignore them so far! ! return searchChildren(this, className); ! } ! /** ! * @param element ! * @param className ! */ ! private IType searchChildren(IRubyElement element, String className) { ! if (element.isType(IRubyElement.TYPE)) { ! if (element.getElementName().equals(className)) return (IType) element; ! } ! if (!(element instanceof IParent)) return null; ! try { ! IRubyElement[] children = ((IParent) element).getChildren(); ! for (int i = 0; i < children.length; i++) { ! IRubyElement child = children[i]; ! IType type = searchChildren(child, className); ! if (type != null) return type; ! } ! } catch (RubyModelException e) { ! RubyCore.log(e); ! } ! return null; ! } ! /** ! * @param project2 ! * @return ! */ ! public static boolean hasRubyNature(IProject project2) { ! try { ! return project2.hasNature(RubyCore.NATURE_ID); ! } catch (CoreException e) { ! // project does not exist or is not open ! } ! return false; ! } ! /** ! * @see Openable ! */ ! protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws RubyModelException { ! // check whether the ruby project can be opened ! if (!underlyingResource.isAccessible()) { ! throw newNotPresentException(); ! } ! IWorkspace workspace = ResourcesPlugin.getWorkspace(); ! IWorkspaceRoot wRoot = workspace.getRoot(); ! // Find all the scripts in this project ! info.setChildren(getScripts()); ! return true; ! } ! /** ! * @return ! */ ! private IRubyElement[] getScripts() { ! // TODO Auto-generated method stub ! return null; ! } ! /** ! * Answers an ID which is used to distinguish project/entries during package ! * fragment root computations ! * ! * @return String ! */ ! public String rootID() { ! return "[PRJ]" + this.project.getFullPath(); //$NON-NLS-1$ ! } ! protected void closing(Object info) { ! // forget source attachment recommendations ! Object[] children = ((RubyElementInfo) info).children; ! for (int i = 0, length = children.length; i < length; i++) { ! Object child = children[i]; ! } ! super.closing(info); ! } ! /** ! * Returns a new element info for this element. ! */ ! protected Object createElementInfo() { ! return new RubyProjectElementInfo(); ! } ! /** ! * @return ! */ ! public ILoadpathEntry[] getLoadpaths() { ! List entries = getLoadPathEntries(); ! if (entries.isEmpty()) return new ILoadpathEntry[0]; ! ILoadpathEntry[] dest = new ILoadpathEntry[entries.size()]; ! System.arraycopy(entries.toArray(), 0, dest, 0, entries.size()); ! return dest; ! } } --- 37,517 ---- public class RubyProject extends Openable implements IProjectNature, IRubyElement, IRubyProject { ! protected IProject project; ! protected List loadPathEntries; ! protected boolean scratched; ! /* ! * Value of project's resolved loadpath while it is being resolved ! */ ! public RubyProject() { ! super(null); ! } ! /** ! * @param aProject ! */ ! public RubyProject(IProject aProject, RubyElement parent) { ! super(parent); ! setProject(aProject); ! } ! /** ! * Configure the project with Java nature. ! */ ! public void configure() throws CoreException { ! ! // register Ruby builder ! addToBuildSpec(RubyCore.BUILDER_ID); ! } public boolean upgrade() throws CoreException { return addToBuildSpec(RubyCore.BUILDER_ID); } ! /** ! * Adds a builder to the build spec for the given project. ! */ ! protected boolean addToBuildSpec(String builderID) throws CoreException { ! IProjectDescription description = this.project.getDescription(); ! int commandIndex = getRubyCommandIndex(description.getBuildSpec()); ! if (commandIndex == -1) { ! ! // Add a Java command to the build spec ! ICommand command = description.newCommand(); ! command.setBuilderName(builderID); ! setRubyCommand(description, command); return true; ! } return false; ! } ! /** ! * Find the specific Ruby command amongst the given build spec and return ! * its index or -1 if not found. ! */ ! private int getRubyCommandIndex(ICommand[] buildSpec) { ! for (int i = 0; i < buildSpec.length; ++i) { ! if (buildSpec[i].getBuilderName().equals(RubyCore.BUILDER_ID)) { return i; } ! } ! return -1; ! } ! /** ! * Update the Ruby command in the build spec (replace existing one if ! * present, add one first if none). ! */ ! private void setRubyCommand(IProjectDescription description, ICommand newCommand) ! throws CoreException { ! ICommand[] oldBuildSpec = description.getBuildSpec(); ! int oldRubyCommandIndex = getRubyCommandIndex(oldBuildSpec); ! ICommand[] newCommands; ! if (oldRubyCommandIndex == -1) { ! // Add a Ruby build spec before other builders (1FWJK7I) ! newCommands = new ICommand[oldBuildSpec.length + 1]; ! System.arraycopy(oldBuildSpec, 0, newCommands, 1, oldBuildSpec.length); ! newCommands[0] = newCommand; ! } else { ! oldBuildSpec[oldRubyCommandIndex] = newCommand; ! newCommands = oldBuildSpec; ! } ! // Commit the spec change into the project ! description.setBuildSpec(newCommands); ! this.project.setDescription(description, null); ! } ! /** ! * /** Removes the Java nature from the project. ! */ ! public void deconfigure() throws CoreException { ! // deregister Ruby builder ! removeFromBuildSpec(RubyCore.BUILDER_ID); ! } ! /** ! * Removes the given builder from the build spec for the given project. ! */ ! protected void removeFromBuildSpec(String builderID) throws CoreException { ! IProjectDescription description = this.project.getDescription(); ! ICommand[] commands = description.getBuildSpec(); ! for (int i = 0; i < commands.length; ++i) { ! if (commands[i].getBuilderName().equals(builderID)) { ! ICommand[] newCommands = new ICommand[commands.length - 1]; ! System.arraycopy(commands, 0, newCommands, 0, i); ! System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1); ! description.setBuildSpec(newCommands); ! this.project.setDescription(description, null); ! return; ! } ! } ! } ! /** ! * Returns true if this handle represents the same Ruby project as the given ! * handle. Two handles represent the same project if they are identical or ! * if they represent a project with the same underlying resource and ! * occurrence counts. ! * ! * @see RubyElement#equals(Object) ! */ ! public boolean equals(Object o) { ! if (this == o) return true; ! if (!(o instanceof RubyProject)) return false; ! RubyProject other = (RubyProject) o; ! return this.project.equals(other.getProject()); ! } ! public boolean exists() { ! return hasRubyNature(this.project); ! } ! public RubyModelManager.PerProjectInfo getPerProjectInfo() throws RubyModelException { ! return RubyModelManager.getRubyModelManager().getPerProjectInfoCheckExistence(this.project); ! } ! public IProject getProject() { ! return project; ! } ! /** ! * @see IRubyElement ! */ ! public IPath getPath() { ! return this.project.getFullPath(); ! } ! protected IProject getProject(String name) { ! return RubyCore.getWorkspace().getRoot().getProject(name); ! } ! public void setProject(IProject aProject) { ! project = aProject; ! } ! public IResource getResource() { ! return this.project; ! } ! public void addLoadPathEntry(IProject anotherRubyProject) { ! scratched = true; ! LoadPathEntry newEntry = new LoadPathEntry(anotherRubyProject); ! getLoadPathEntries().add(newEntry); ! } ! public void removeLoadPathEntry(IProject anotherRubyProject) { ! Iterator entries = getLoadPathEntries().iterator(); ! while (entries.hasNext()) { ! LoadPathEntry entry = (LoadPathEntry) entries.next(); ! if (entry.getEntryKind() == ILoadpathEntry.CPE_PROJECT ! && entry.getProject().getName().equals(anotherRubyProject.getName())) { ! getLoadPathEntries().remove(entry); ! scratched = true; ! break; ! } ! } ! } ! public List getLoadPathEntries() { ! if (loadPathEntries == null) { ! loadLoadPathEntries(); ! } ! return loadPathEntries; ! } ! public List getReferencedProjects() { ! List referencedProjects = new ArrayList(); ! Iterator iterator = getLoadPathEntries().iterator(); ! while (iterator.hasNext()) { ! LoadPathEntry pathEntry = (LoadPathEntry) iterator.next(); ! if (pathEntry.getEntryKind() == ILoadpathEntry.CPE_PROJECT) ! referencedProjects.add(pathEntry.getProject()); ! } ! return referencedProjects; ! } ! public String[] getRequiredProjectNames() throws RubyModelException { ! List prerequisites = new ArrayList(); ! // need resolution ! List entries = getLoadPathEntries(); ! for (Iterator iter = entries.iterator(); iter.hasNext();) { ! ILoadpathEntry entry = (ILoadpathEntry) iter.next(); ! if (entry.getEntryKind() == ILoadpathEntry.CPE_PROJECT) { ! prerequisites.add(entry.getPath().lastSegment()); ! } ! } ! int size = prerequisites.size(); ! if (size == 0) { return new String[0]; } ! String[] result = new String[size]; ! prerequisites.toArray(result); ! return result; ! } ! protected void loadLoadPathEntries() { ! loadPathEntries = new ArrayList(); ! IFile loadPathsFile = getLoadPathEntriesFile(); ! XMLReader reader = null; ! try { ! reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); ! reader.setContentHandler(getLoadPathEntriesContentHandler()); ! reader.parse(new InputSource(loadPathsFile.getContents())); ! } catch (Exception e) { ! // the file is nonextant or unreadable ! } ! } ! protected ContentHandler getLoadPathEntriesContentHandler() { ! return new ContentHandler() { ! public void characters(char[] arg0, int arg1, int arg2) throws SAXException { ! } ! public void endDocument() throws SAXException { ! } ! public void endElement(String arg0, String arg1, String arg2) throws SAXException { ! } ! public void endPrefixMapping(String arg0) throws SAXException { ! } ! public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException { ! } ! public void processingInstruction(String arg0, String arg1) throws SAXException { ! } ! public void setDocumentLocator(Locator arg0) { ! } ! public void skippedEntity(String arg0) throws SAXException { ! } ! public void startDocument() throws SAXException { ! } ! public void startElement(String namespaceURI, String localName, String qName, ! Attributes atts) throws SAXException { ! if ("pathentry".equals(qName)) if ("project".equals(atts.getValue("type"))) { ! IPath referencedProjectPath = new Path(atts.getValue("path")); ! IProject referencedProject = getProject(referencedProjectPath.lastSegment()); ! loadPathEntries.add(new LoadPathEntry(referencedProject)); ! } ! } ! public void startPrefixMapping(String arg0, String arg1) throws SAXException { ! } ! }; ! } ! protected IFile getLoadPathEntriesFile() { ! return project.getFile(".loadpath"); ! } ! public void save() throws CoreException { ! if (scratched) { ! InputStream xmlPath = new ByteArrayInputStream(getLoadPathXML().getBytes()); ! IFile loadPathsFile = getLoadPathEntriesFile(); ! if (!loadPathsFile.exists()) ! loadPathsFile.create(xmlPath, true, null); ! else ! loadPathsFile.setContents(xmlPath, true, false, null); ! scratched = false; ! } ! } ! protected String getLoadPathXML() { ! StringBuffer buffer = new StringBuffer(); ! buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><loadpath>"); ! Iterator pathEntriesIterator = loadPathEntries.iterator(); ! while (pathEntriesIterator.hasNext()) { ! LoadPathEntry entry = (LoadPathEntry) pathEntriesIterator.next(); ! buffer.append(entry.toXML()); ! } ! buffer.append("</loadpath>"); ! return buffer.toString(); ! } ! /** ! * @see IRubyElement ! */ ! public IResource getUnderlyingResource() throws RubyModelException { ! if (!exists()) throw newNotPresentException(); ! return this.project; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#getElementName() ! */ ! public String getElementName() { ! return project.getName(); ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType() ! */ ! public int getElementType() { ! return IRubyElement.PROJECT; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#hasChildren() ! */ ! public boolean hasChildren() { ! return true; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyElement#getParent() ! */ ! public IRubyElement getParent() { ! return null; ! } ! /* ! * (non-Rubydoc) ! * ! * @see org.rubypeople.rdt.core.IRubyProject#findType(java.lang.String) ! */ ! public IType findType(String fullyQualifiedName) { ! int index = fullyQualifiedName.lastIndexOf("::"); ! String className = null, packageName = null; ! if (index == -1) { ! packageName = ""; ! className = fullyQualifiedName; ! } else { ! packageName = fullyQualifiedName.substring(0, index); ! className = fullyQualifiedName.substring(index + 2); ! } ! // FIXME Handle the namespaces properly. we ignore them so far! ! return searchChildren(this, className); ! } ! /** ! * @param element ! * @param className ! */ ! private IType searchChildren(IRubyElement element, String className) { ! if (element.isType(IRubyElement.TYPE)) { ! if (element.getElementName().equals(className)) return (IType) element; ! } ! if (!(element instanceof IParent)) return null; ! try { ! IRubyElement[] children = ((IParent) element).getChildren(); ! for (int i = 0; i < children.length; i++) { ! IRubyElement child = children[i]; ! IType type = searchChildren(child, className); ! if (type != null) return type; ! } ! } catch (RubyModelException e) { ! RubyCore.log(e); ! } ! return null; ! } ! /** ! * @param project2 ! * @return ! */ ! public static boolean hasRubyNature(IProject project2) { ! try { ! return project2.hasNature(RubyCore.NATURE_ID); ! } catch (CoreException e) { ! // project does not exist or is not open ! } ! return false; ! } ! /** ! * @see Openable ! */ ! protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm, ! Map newElements, IResource underlyingResource) throws RubyModelException { ! // check whether the ruby project can be opened ! if (!underlyingResource.isAccessible()) { throw newNotPresentException(); } ! // Find all the scripts in this project ! info.setChildren(getScripts()); ! return true; ! } ! /** ! * @return ! */ ! private IRubyElement[] getScripts() { ! ProjectFileFinder finder = new ProjectFileFinder(project); ! try { ! List projectFiles = finder.findFiles(); ! IRubyElement[] scripts = new IRubyElement[projectFiles.size()]; ! int i = 0; ! for (Iterator iter = projectFiles.iterator(); iter.hasNext();) { ! IResource resource = (IResource) iter.next(); ! scripts[i] = new RubyScript(this, (IFile) resource, resource.getName(), ! DefaultWorkingCopyOwner.PRIMARY); ! i++; ! } ! return scripts; ! } catch (CoreException e) { ! e.printStackTrace(); ! return new IRubyElement[0]; ! } ! } ! /** ! * Answers an ID which is used to distinguish project/entries during package ! * fragment root computations ! * ! * @return String ! */ ! public String rootID() { ! return "[PRJ]" + this.project.getFullPath(); //$NON-NLS-1$ ! } ! /** ! * Returns a new element info for this element. ! */ ! protected Object createElementInfo() { ! return new RubyProjectElementInfo(); ! } ! ! /** ! * @return ! */ ! public ILoadpathEntry[] getLoadpaths() { ! List entries = getLoadPathEntries(); ! if (entries.isEmpty()) return new ILoadpathEntry[0]; ! ILoadpathEntry[] dest = new ILoadpathEntry[entries.size()]; ! System.arraycopy(entries.toArray(), 0, dest, 0, entries.size()); ! return dest; ! } } |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:40:43
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5733/src/org/rubypeople/rdt/internal/core/builder Modified Files: ProjectFileFinder.java Log Message: make this class public so we can use it in RubyProject Index: ProjectFileFinder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/builder/ProjectFileFinder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProjectFileFinder.java 12 Nov 2005 19:15:58 -0000 1.4 --- ProjectFileFinder.java 29 Nov 2005 19:40:21 -0000 1.5 *************** *** 20,24 **** import org.eclipse.core.runtime.CoreException; ! final class ProjectFileFinder implements IFileProvider { private final IProject project; --- 20,24 ---- import org.eclipse.core.runtime.CoreException; ! public final class ProjectFileFinder implements IFileProvider { private final IProject project; |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:38:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4508/src/org/rubypeople/rdt/internal/core Modified Files: RubyScript.java Log Message: define and implement a getTypes method Index: RubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScript.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RubyScript.java 1 Oct 2005 23:01:01 -0000 1.16 --- RubyScript.java 29 Nov 2005 19:38:00 -0000 1.17 *************** *** 29,32 **** --- 29,33 ---- import java.io.IOException; import java.io.InputStreamReader; + import java.util.ArrayList; import java.util.Map; *************** *** 580,582 **** --- 581,593 ---- return new ImportContainer(this); } + + /** + * @see ICompilationUnit#getTypes() + */ + public IType[] getTypes() throws RubyModelException { + ArrayList list = getChildrenOfType(TYPE); + IType[] array= new IType[list.size()]; + list.toArray(array); + return array; + } } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:38:08
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4508/src/org/rubypeople/rdt/core Modified Files: IRubyScript.java Log Message: define and implement a getTypes method Index: IRubyScript.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/IRubyScript.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** IRubyScript.java 12 Mar 2005 15:30:03 -0000 1.6 --- IRubyScript.java 29 Nov 2005 19:38:00 -0000 1.7 *************** *** 33,37 **** public interface IRubyScript extends IRubyElement, ISourceReference, IParent, IOpenable { ! public String[] EXTENSIONS = { "rb", "rbw", "rhtml"}; /** --- 33,37 ---- public interface IRubyScript extends IRubyElement, ISourceReference, IParent, IOpenable { ! public String[] EXTENSIONS = { "rb", "rbw", "rhtml", "rjs", "rxml"}; /** *************** *** 349,351 **** --- 349,361 ---- */ WorkingCopyOwner getOwner(); + + /** + * Returns the top-level types declared in this compilation unit + * in the order in which they appear in the source. + * + * @return the top-level types declared in this compilation unit + * @throws RubyModelException if this element does not exist or if an + * exception occurs while accessing its corresponding resource + */ + IType[] getTypes() throws RubyModelException; } \ No newline at end of file |
|
From: Christopher W. <caw...@us...> - 2005-11-29 19:37:40
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4395/src/org/rubypeople/rdt/internal/core Modified Files: RubyScriptStructureBuilder.java Log Message: set the super class name for classes and modules Index: RubyScriptStructureBuilder.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RubyScriptStructureBuilder.java 17 Oct 2005 04:31:55 -0000 1.12 --- RubyScriptStructureBuilder.java 29 Nov 2005 19:37:28 -0000 1.13 *************** *** 475,480 **** ISourcePosition pos = iVisited.getPosition(); setKeywordRange("class", pos, info, name); ! ! // TODO Set the superclass! info.setIncludedModuleNames(new String[] {"Kernel"}); infoStack.push(info); --- 475,482 ---- ISourcePosition pos = iVisited.getPosition(); setKeywordRange("class", pos, info, name); ! ! Node superNode = iVisited.getSuperNode(); ! String superClass = getSuperClassName(superNode); ! info.setSuperclassName(superClass); info.setIncludedModuleNames(new String[] {"Kernel"}); infoStack.push(info); *************** *** 490,493 **** --- 492,513 ---- } + /** + * Build up the fully qualified name of the super class for a class declaration + * @param superNode + * @return + */ + private String getSuperClassName(Node superNode) { + if (superNode == null) return "Object"; + if (superNode instanceof ConstNode) { + ConstNode superClassNode = (ConstNode) superNode; + return superClassNode.getName(); + } + if (superNode instanceof Colon2Node) { + Colon2Node superClassNode = (Colon2Node) superNode; + return getSuperClassName(superClassNode.getLeftNode()) + "::" + superClassNode.getName(); + } + return "Object"; + } + private void setLocalVarRange( ISourcePosition pos, MemberElementInfo info, String name ){ int start = pos.getStartOffset() - name.length(); *************** *** 1191,1194 **** --- 1211,1215 ---- ISourcePosition pos = iVisited.getPosition(); setKeywordRange("module", pos, info, name); + info.setSuperclassName("Module"); // TODO Set more info! infoStack.push(info); |
|
From: Christopher W. <caw...@us...> - 2005-11-29 02:20:20
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24221/src/org/rubypeople/rdt/internal/ui/text/ruby Modified Files: RubyCompletionProcessor.java Log Message: a temporary hack for suggesting Kernel methods in our completion processor - it's a hack because it's hardcoded method names in a statis array. We should determine the methods by asking the interpreter (when a user selects one). We should also think about making special completions for methods (expect the right number of arguments/block). 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.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RubyCompletionProcessor.java 1 Apr 2005 01:59:21 -0000 1.13 --- RubyCompletionProcessor.java 29 Nov 2005 02:20:12 -0000 1.14 *************** *** 42,45 **** --- 42,58 ---- "PID for ruby interpreter", "status of the latest executed child process", "array of paths that ruby interpreter searches for files"}; + // FIXME This is an ugly hack, just hard-coding method names + // FIXME Create a model for Ruby core in our Ruby Model! + private static String[] KERNEL_METHODS = {"abort", "at_exit", "autoload", "binding", + "block_given?", "callcc", "caller", "catch", "chomp", + "chomp!", "chop", "chop!", "eval", "exec", "exit", + "exit!", "fail", "fork", "format", "gets", "global_variables", + "gsub", "gsub!", "iterator?", "lambda", "load", "local_variables", + "loop", "open", "p", "print", "printf", "proc", "putc", + "puts", "raise", "rand", "readline", "readlines", "require", + "scan", "select", "set_trace_func", "singleton_method_added", + "sleep", "split", "sprintf", "srand", "sub", "sub!", "syscall", + "system", "test", "throw", "trace_var", "trap", "untrace_var"}; + /** * The prefix for the current content assist *************** *** 101,105 **** private ICompletionProposal[] determineRubyElementProposals(ITextViewer viewer, int documentOffset) { ArrayList completionProposals = new ArrayList(getDocumentsRubyElements()); ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); // following the JDT convention, if there's no text already entered, --- 114,119 ---- private ICompletionProposal[] determineRubyElementProposals(ITextViewer viewer, int documentOffset) { ArrayList completionProposals = new ArrayList(getDocumentsRubyElements()); ! completionProposals.addAll(addKernelMethods()); ! String prefix = getCurrentPrefix(viewer.getDocument().get(), documentOffset); // following the JDT convention, if there's no text already entered, *************** *** 108,113 **** // FIXME Add elements from required/loaded files! } ! ! ArrayList possibleProposals = new ArrayList(); for (int i = 0; i < completionProposals.size(); i++) { String proposal = (String) completionProposals.get(i); --- 122,127 ---- // FIXME Add elements from required/loaded files! } ! ! ArrayList possibleProposals = new ArrayList(); for (int i = 0; i < completionProposals.size(); i++) { String proposal = (String) completionProposals.get(i); *************** *** 123,126 **** --- 137,148 ---- } + private List addKernelMethods() { + List kernelProposals = new ArrayList(); + for (int i = 0; i < KERNEL_METHODS.length; i++) { + kernelProposals.add(KERNEL_METHODS[i]); + } + return kernelProposals; + } + /* * (non-Javadoc) |
|
From: David C. <dc...@us...> - 2005-11-23 10:45:45
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27925 Modified Files: plugin.xml Log Message: Tweaked Key bindings again to be consistent with 3.2 Index: plugin.xml =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/plugin.xml,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** plugin.xml 21 Nov 2005 01:26:32 -0000 1.66 --- plugin.xml 23 Nov 2005 10:45:37 -0000 1.67 *************** *** 198,217 **** sequence="M1+M2+F" commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" - platform="windows" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> - <key - sequence="M1+M2+F" - commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" - platform="motif" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> - <key - sequence="M1+M2+F" - commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" - platform="carbon" - schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> - <key - sequence="M1+M2+F" - commandId="org.rubypeople.rdt.ui.edit.text.ruby.format" - platform="photon" schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> <key --- 198,201 ---- |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:25:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20632/META-INF Added Files: MANIFEST.MF Log Message: add manifest to make it an OSGi bundle, add dependency on eclipse.search bundle --- NEW FILE: MANIFEST.MF --- Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Plugin.name Bundle-SymbolicName: org.rubypeople.rdt.ui; singleton:=true Bundle-Version: 0.6.0 Bundle-ClassPath: rdtui.jar Bundle-Activator: org.rubypeople.rdt.internal.ui.RubyPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: org.rubypeople.rdt.internal.corext, org.rubypeople.rdt.internal.corext.util, org.rubypeople.rdt.internal.ui, org.rubypeople.rdt.internal.ui.actions, org.rubypeople.rdt.internal.ui.dialogs, org.rubypeople.rdt.internal.ui.infoviews, org.rubypeople.rdt.internal.ui.preferences, org.rubypeople.rdt.internal.ui.rdocexport, org.rubypeople.rdt.internal.ui.resourcesview, org.rubypeople.rdt.internal.ui.rubyeditor, org.rubypeople.rdt.internal.ui.rubyeditor.outline, org.rubypeople.rdt.internal.ui.rubyeditor.templates, org.rubypeople.rdt.internal.ui.text, org.rubypeople.rdt.internal.ui.text.folding, org.rubypeople.rdt.internal.ui.text.ruby, org.rubypeople.rdt.internal.ui.text.ruby.hover, org.rubypeople.rdt.internal.ui.util, org.rubypeople.rdt.internal.ui.viewsupport, org.rubypeople.rdt.internal.ui.wizards, org.rubypeople.rdt.internal.ui.wizards.dialogfields, org.rubypeople.rdt.ui, org.rubypeople.rdt.ui.actions, org.rubypeople.rdt.ui.rubyeditor, org.rubypeople.rdt.ui.text, org.rubypeople.rdt.ui.text.folding, org.rubypeople.rdt.ui.text.ruby.hover Require-Bundle: org.eclipse.ui.ide, org.eclipse.ui.views, org.eclipse.jface.text, org.eclipse.ui.workbench.texteditor, org.eclipse.ui.editors, org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.ui, org.eclipse.ui.console, org.eclipse.debug.ui, org.rubypeople.rdt.core, org.eclipse.ui.workbench, org.eclipse.ui.forms, org.rubypeople.rdt.launching, org.eclipse.search Eclipse-AutoStart: true |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:25:47
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20632 Modified Files: build.properties Log Message: add manifest to make it an OSGi bundle, add dependency on eclipse.search bundle Index: build.properties =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/build.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** build.properties 28 Nov 2004 15:53:17 -0000 1.7 --- build.properties 22 Nov 2005 01:25:30 -0000 1.8 *************** *** 3,7 **** icons/**/*,\ rdtui.jar,\ ! templates/ plugin = org.rubypeople.rdt.ui plugin.name = rdtui --- 3,8 ---- icons/**/*,\ rdtui.jar,\ ! templates/,\ ! META-INF/ plugin = org.rubypeople.rdt.ui plugin.name = rdtui |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:25:46
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20613/META-INF Log Message: Directory /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/META-INF added to the repository |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:24:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20244/src/org/rubypeople/rdt/internal/launching Modified Files: TC_RubyRuntime.java Log Message: add new method stubs for methods that implementations have to have (in Eclipse 3.2 M3) Index: TC_RubyRuntime.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RubyRuntime.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TC_RubyRuntime.java 1 Oct 2005 22:58:02 -0000 1.1 --- TC_RubyRuntime.java 22 Nov 2005 01:23:50 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- import java.io.StringWriter; import java.io.Writer; + import java.net.URI; import java.util.Arrays; import java.util.List; *************** *** 351,354 **** --- 352,360 ---- } + public URI getLocationURI() { + // TODO Auto-generated method stub + return null; + } + } |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:24:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20215/src/org/rubypeople/eclipse/shams/resources Modified Files: ShamResource.java Log Message: add new method stubs for methods that implementations have to have (in Eclipse 3.2 M3) Index: ShamResource.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/resources/ShamResource.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ShamResource.java 12 Nov 2005 19:16:08 -0000 1.10 --- ShamResource.java 22 Nov 2005 01:23:47 -0000 1.11 *************** *** 11,14 **** --- 11,17 ---- package org.rubypeople.eclipse.shams.resources; + import java.io.File; + import java.net.URI; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IMarker; *************** *** 279,281 **** --- 282,288 ---- } + public URI getLocationURI() { + return path.toFile().toURI(); + } + } |
|
From: Christopher W. <caw...@us...> - 2005-11-22 01:24:16
|
Update of /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/debug/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20215/src/org/rubypeople/eclipse/shams/debug/core Modified Files: ShamLaunchConfigurationType.java Log Message: add new method stubs for methods that implementations have to have (in Eclipse 3.2 M3) Index: ShamLaunchConfigurationType.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.eclipse.shams/src/org/rubypeople/eclipse/shams/debug/core/ShamLaunchConfigurationType.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ShamLaunchConfigurationType.java 2 Jun 2004 21:52:04 -0000 1.7 --- ShamLaunchConfigurationType.java 22 Nov 2005 01:23:47 -0000 1.8 *************** *** 1,4 **** --- 1,6 ---- package org.rubypeople.eclipse.shams.debug.core; + import java.util.Set; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.runtime.CoreException; *************** *** 75,77 **** --- 77,83 ---- } + public Set getSupportedModes() { + return null; + } + } |