From: khartlage Date: Sat, 8 May 2004 19:26:32 +0000 (+0000) Subject: misc changes X-Git-Url: http://git.phpeclipse.com?hp=abf87ed9c730573c0fccb24340c4b4a74d110ee3 misc changes --- diff --git a/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/phpeditor/php/test/IdentifierIndexManagerTest.java b/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/phpeditor/php/test/IdentifierIndexManagerTest.java new file mode 100644 index 0000000..f3969a7 --- /dev/null +++ b/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/phpeditor/php/test/IdentifierIndexManagerTest.java @@ -0,0 +1,49 @@ +/* + * Created on 08.05.2004 + * + * To change the template for this generated file go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +package net.sourceforge.phpeclipse.phpeditor.php.test; + +import java.io.StringBufferInputStream; + +import org.eclipse.core.runtime.CoreException; + +import junit.framework.TestCase; +import net.sourceforge.phpeclipse.builder.IdentifierIndexManager; + +/** + * + */ +public class IdentifierIndexManagerTest extends TestCase { + IdentifierIndexManager fManager; + + public void testManager() { + System.out.println("----- testManager -----"); + String testString = "]*script*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*object*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*iframe*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*applet*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*meta*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*style*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*form*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"\\([^>]*\\\"?[^)]*\\)\", $secvalue)) ||\r\n" + + " (eregi(\"\\\"\", $secvalue))) {\r\n" + + " die (\"


The html tags you attempted to use are not allowed

[ Go Back ]\");\r\n" + + " } ?>"; + IdentifierIndexManager.LineCreator lineCreator = fManager.createLineCreator(); + try { + fManager.addInputStream(new StringBufferInputStream(testString), "test", lineCreator); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + /* (non-Javadoc) + * @see junit.framework.TestCase#setUp() + */ + protected void setUp() throws Exception { + fManager = new IdentifierIndexManager("c:\\temp\\test"); + } +} diff --git a/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/tests/parser/PHPManualTestCase.java b/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/tests/parser/PHPManualTestCase.java index fb231ff..c89fc35 100644 --- a/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/tests/parser/PHPManualTestCase.java +++ b/net.sourceforge.phpeclipse.tests/src/net/sourceforge/phpeclipse/tests/parser/PHPManualTestCase.java @@ -19,6 +19,17 @@ public class PHPManualTestCase extends AbstractCompilerTest { * Test the PHP Parser with different PHP snippets */ public void testPHPParser() { + checkPHP("if ((eregi(\"<[^>]*script*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*object*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*iframe*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*applet*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*meta*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*style*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"<[^>]*form*\\\"?[^>]*>\", $secvalue)) ||\r\n" + + " (eregi(\"\\([^>]*\\\"?[^)]*\\)\", $secvalue)) ||\r\n" + + " (eregi(\"\\\"\", $secvalue))) {\r\n" + + " die (\"


The html tags you attempted to use are not allowed

[ Go Back ]\");\r\n" + + " }"); checkPHP("function foo()" + "{" + " echo \"In foo()
\\n\";" + "}" + "" + "function bar($arg = '')" + "{" + " echo \"In bar(); argument was '$arg'.
\\n\";" + "}" + "" diff --git a/net.sourceforge.phpeclipse/icons/obj16/template_obj.gif b/net.sourceforge.phpeclipse/icons/obj16/template_obj.gif new file mode 100644 index 0000000..65c2632 Binary files /dev/null and b/net.sourceforge.phpeclipse/icons/obj16/template_obj.gif differ diff --git a/net.sourceforge.phpeclipse/plugin.properties b/net.sourceforge.phpeclipse/plugin.properties index 16b1068..a8abba9 100644 --- a/net.sourceforge.phpeclipse/plugin.properties +++ b/net.sourceforge.phpeclipse/plugin.properties @@ -77,6 +77,8 @@ CommentAction.label= Co&mment@Ctrl+/ UncommentAction.label= &Uncomment@Ctrl+\\ +ToggleCommentAction.label= Togg&le Comment + ShiftRightAction.label= Sh&ift Right ShiftLeftAction.label= S&hift Left @@ -168,6 +170,15 @@ ActionDefinition.comment.description= Turn the selected lines into PHP comments ActionDefinition.uncomment.name= Uncomment ActionDefinition.uncomment.description= Uncomment the selected PHP comment lines +ActionDefinition.toggleComment.name= Toggle Comment +ActionDefinition.toggleComment.description= Toggle comment the selected lines + +ActionDefinition.addBlockComment.name= Add Block Comment +ActionDefinition.addBlockComment.description= Enclose the selection with a block comment + +ActionDefinition.removeBlockComment.name= Remove Block Comment +ActionDefinition.removeBlockComment.description= Remove the block comment around the selection + ActionDefinition.format.name= Format ActionDefinition.format.description= Format the selected text @@ -349,4 +360,8 @@ PreferencePage.antRuntimePreferences = Runtime Program.externalTools = PHP Program -OccurrenceAnnotation.label= PHP Marker Occurrences \ No newline at end of file +OccurrenceAnnotation.label= PHP Marker Occurrences + + +phpEditorFontDefiniton.label= Java Editor Text Font +phpEditorFontDefintion.description= The Java editor text font is used by Java editors. diff --git a/net.sourceforge.phpeclipse/plugin.xml b/net.sourceforge.phpeclipse/plugin.xml index ac91d55..113bcbc 100644 --- a/net.sourceforge.phpeclipse/plugin.xml +++ b/net.sourceforge.phpeclipse/plugin.xml @@ -282,8 +282,9 @@ default="true" icon="icons/obj16/phpedit.gif" extensions="php" - contributorClass="net.sourceforge.phpeclipse.phpeditor.PHPActionContributor" + contributorClass="net.sourceforge.phpeclipse.phpeditor.CompilationUnitEditorActionContributor" class="net.sourceforge.phpeclipse.phpeditor.PHPUnitEditor" + symbolicFontName="net.sourceforge.phpdt.ui.editors.textfont" id="net.sourceforge.phpeclipse.PHPUnitEditor"> + + + + %phpEditorFontDefintion.description + + + - - + - - + - + @@ -618,7 +638,7 @@ - + -->