1616public class CompositeResources extends Resource implements IClasspathContainer {
1717 protected List resources ;
1818 protected List abandonedResources ;
19- //private Resource[] children;
2019 private String binRelativePath ;
2120
2221 private String compilerStatus ;
@@ -29,8 +28,6 @@ public File getAbsoluteFile() {
2928 }
3029 }
3130 public String getName () {
32- // String path = getRelativePath();
33- // return path.substring(1, path.indexOf('/', 2));
3431 return super .getName ();
3532 }
3633
@@ -46,9 +43,7 @@ public String getBinRelativePath() {
4643 return getRelativePath ().substring (0 , getRelativePath ().lastIndexOf ('/' ) + 1 );
4744 } else {
4845 return "" ;
49- //return binRelativePath;
5046 }
51- //return super.getBinRelativePath();
5247 }
5348
5449 public void load () {
@@ -81,8 +76,6 @@ public void load(InputStream fis) {
8176 } catch (IOException e1 ) {
8277 e1 .printStackTrace ();
8378 }
84- //setFolder(file.getParentFile());
85- //setRelativePath(file.getName());
8679 compilerStatus = props .getProperty ("j2s.compiler.status" );
8780
8881 binRelativePath = props .getProperty (PathUtil .J2S_OUTPUT_PATH );
@@ -93,14 +86,6 @@ public void load(InputStream fis) {
9386 reses = PathUtil .getAbandonedResources (props );
9487 addResourceByString (abandonedResources , reses );
9588
96- /*
97- this.children = new Resource[resources.size()];
98- for (int i = 0; i < resources.size(); i++) {
99- Resource res = (Resource) resources.get(i);
100- this.children[i] = res;
101- res.setParent(this);
102- }
103- */
10489 }
10590 }
10691
@@ -172,12 +157,10 @@ public void store(Properties props) {
172157 StringBuffer buf = new StringBuffer ();
173158 for (int i = 0 ; i < reses .length ; i ++) {
174159 String str = reses [i ].toResourceString ();
175- //if (str != null) {
176160 buf .append (str );
177161 if (i != reses .length - 1 ) {
178162 buf .append ("," );
179163 }
180- //}
181164 }
182165 props .setProperty (PathUtil .J2S_RESOURCES_LIST , buf .toString ());
183166 props .setProperty (PathUtil .J2S_OUTPUT_PATH , binRelativePath );
@@ -188,7 +171,6 @@ public Resource[] getChildren() {
188171 this .load ();
189172 }
190173 return (Resource []) resources .toArray (new Resource [0 ]);
191- //return children;
192174 }
193175 public void addResource (Resource res ) {
194176 if (!resources .contains (res )) {
@@ -228,9 +210,6 @@ public void topResource(int res) {
228210 public void bottomResource (int res ) {
229211
230212 }
231- // public String getBinRelativePath() {
232- // return binRelativePath;
233- // }
234213
235214 public void setBinRelativePath (String binRelativePath ) {
236215 this .binRelativePath = binRelativePath ;
0 commit comments