|
From: <caw...@us...> - 2007-06-14 21:36:43
|
Revision: 2620
http://svn.sourceforge.net/rubyeclipse/?rev=2620&view=rev
Author: cawilliams
Date: 2007-06-14 14:36:41 -0700 (Thu, 14 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyPartitions.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyScanner.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyPartitions.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyPartitions.java 2007-06-14 19:35:27 UTC (rev 2619)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/IRubyPartitions.java 2007-06-14 21:36:41 UTC (rev 2620)
@@ -26,4 +26,14 @@
* The identifier multi-line comment partition content type.
*/
String RUBY_MULTI_LINE_COMMENT= "__ruby_multiline_comment"; //$NON-NLS-1$
+
+ /**
+ * The identifier regular expression partition content type.
+ */
+ String RUBY_REGULAR_EXPRESSION= "__ruby_regular_expression"; //$NON-NLS-1$
+
+ /**
+ * The identifier string partition content type.
+ */
+ String RUBY_STRING= "__ruby_string"; //$NON-NLS-1$
}
Added: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyScanner.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyScanner.java (rev 0)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/text/ruby/SingleTokenRubyScanner.java 2007-06-14 21:36:41 UTC (rev 2620)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.rubypeople.rdt.internal.ui.text.ruby;
+
+
+import java.util.List;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.rubypeople.rdt.ui.text.IColorManager;
+
+
+/**
+ *
+ */
+public final class SingleTokenRubyScanner extends AbstractRubyScanner {
+
+ private String[] fProperty;
+
+ public SingleTokenRubyScanner(IColorManager manager, IPreferenceStore store, String property) {
+ super(manager, store);
+ fProperty= new String[] { property };
+ initialize();
+ }
+
+ /*
+ * @see AbstractRubyScanner#getTokenProperties()
+ */
+ protected String[] getTokenProperties() {
+ return fProperty;
+ }
+
+ /*
+ * @see AbstractRubyScanner#createRules()
+ */
+ protected List createRules() {
+ setDefaultReturnToken(getToken(fProperty[0]));
+ return null;
+ }
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|