11/*******************************************************************************
2- * Copyright (c) 2011, 2023 Google, Inc.
2+ * Copyright (c) 2011, 2025 Google, Inc. and others .
33 *
44 * This program and the accompanying materials are made available under the
55 * terms of the Eclipse Public License 2.0 which is available at
2626
2727import org .apache .commons .io .FilenameUtils ;
2828import org .junit .jupiter .api .BeforeEach ;
29- import org .junit .jupiter .api .Disabled ;
3029import org .junit .jupiter .api .Test ;
3130
3231import java .io .File ;
@@ -103,25 +102,23 @@ public void test_textSource_absolutePath() throws Exception {
103102 /**
104103 * Image creation using constructor with input stream (over class resource).
105104 */
106- @ Disabled
107105 @ Test
108106 public void test_textSource_image_over_classpath () throws Exception {
109107 assert_getText_getClipboardSource_forSource (
110- "new Image(null, getClass().getResourceAsStream(\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" ))" ,
111- "Classpath: /javax/swing/plaf/basic/ icons/JavaCup16.png " ,
112- getInvocationSource (shell (), "{wbp_classTop}" , "/javax/swing/plaf/basic/ icons/JavaCup16.png " ));
108+ "new Image(null, getClass().getResourceAsStream(\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" ))" ,
109+ "Classpath: /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif " ,
110+ getInvocationSource (shell (), "{wbp_classTop}" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ));
113111 }
114112
115113 /**
116114 * Image creation using constructor with input stream (over class resource).
117115 */
118- @ Disabled
119116 @ Test
120117 public void test_textSource_image_over_classpath_OtherClass () throws Exception {
121118 assert_getText_getClipboardSource_forSource (
122- "new Image(null, java.lang.String. class.getResourceAsStream(\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" ))" ,
123- "Classpath: /javax/swing/plaf/basic/ icons/JavaCup16.png " ,
124- getInvocationSource (shell (), "{wbp_classTop}" , "/javax/swing/plaf/basic/ icons/JavaCup16.png " ));
119+ "new Image(null, org.eclipse.wb.core.editor.constants.CoreImages. class.getResourceAsStream(\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" ))" ,
120+ "Classpath: /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif " ,
121+ getInvocationSource (shell (), "{wbp_classTop}" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ));
125122 }
126123
127124 ////////////////////////////////////////////////////////////////////////////
@@ -154,9 +151,9 @@ public void test_textSource_absolutePath2() throws Exception {
154151 public void test_textSource_image_over_classpath2 () throws Exception {
155152 CompositeInfo shell = shell ();
156153 assert_getText_getClipboardSource_forSource2 (
157- getInvocationSource (shell , "getClass()" , "\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" " ),
158- "Classpath: /javax/swing/plaf/basic/ icons/JavaCup16.png " ,
159- getInvocationSource (shell , "{wbp_classTop}" , "\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" " ));
154+ getInvocationSource (shell , "getClass()" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ),
155+ "Classpath: /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif " ,
156+ getInvocationSource (shell , "{wbp_classTop}" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ));
160157 }
161158
162159 /**
@@ -166,9 +163,9 @@ public void test_textSource_image_over_classpath2() throws Exception {
166163 public void test_textSource_image_over_classpath_OtherClass2 () throws Exception {
167164 CompositeInfo shell = shell ();
168165 assert_getText_getClipboardSource_forSource2 (
169- getInvocationSource (shell , "java.lang.String.class" , "\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" " ),
170- "Classpath: /javax/swing/plaf/basic/ icons/JavaCup16.png " ,
171- getInvocationSource (shell , "{wbp_classTop}" , "\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" " ));
166+ getInvocationSource (shell , "java.lang.String.class" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ),
167+ "Classpath: /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif " ,
168+ getInvocationSource (shell , "{wbp_classTop}" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ));
172169 }
173170
174171 /**
@@ -210,15 +207,15 @@ public void test_textSource_order() throws Exception {
210207 "}" );
211208 ManagerContainerInfo .getResourceManagerInfo (shell );
212209 shell .addMethodInvocation ("setImage(org.eclipse.swt.graphics.Image)" ,
213- getInvocationSource (shell , "java.lang.String.class" , "\" /javax/swing/plaf/basic/ icons/JavaCup16.png \" " ));
210+ getInvocationSource (shell , "java.lang.String.class" , "\" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" " ));
214211 shell .refresh ();
215212 assertEditor (
216213 "// filler filler filler" ,
217214 "public class Test extends Shell {" ,
218215 " private LocalResourceManager localResourceManager;" ,
219216 " public Test() {" ,
220217 " createResourceManager();" ,
221- " setImage(localResourceManager.create(ImageDescriptor.createFromFile(String.class, \" /javax/swing/plaf/basic/ icons/JavaCup16.png \" )));" ,
218+ " setImage(localResourceManager.create(ImageDescriptor.createFromFile(String.class, \" /org/eclipse/wb/core/controls/flyout/ icons/arrow_bottom.gif \" )));" ,
222219 " }" ,
223220 " private void createResourceManager() {" ,
224221 " localResourceManager = new LocalResourceManager(JFaceResources.getResources(),this);" ,
0 commit comments