Home » Language IDEs » Java Development Tools (JDT) » accessing non-Java files
accessing non-Java files [message #32786] |
Tue, 20 May 2003 18:47  |
Eclipse User |
|
|
|
Originally posted by: wrcox.ucsd.edu
Eclipse Platform v2.1.0
Windows XP
My web application is structured as follows:
\webapps\mywebapp\javascript\*.js
\webapps\mywebapp\WEB-INF\classes\com\mycompany\myproject\*. java
\webapps\mywebapp\WEB-INF\xml\com\mycompany\myproject\*.xml
When I set up an Eclipse Java Project, I point it to
\webapps\mywebapps\WEB-INF\classes. This works fine for Java. I can see
all the packages and classes in the Java Browsing perspective. However, I
cannot see my XML and Javascript. I tried pointing Eclipse to
\webapps\mywebapp, but then I could not see the Java packages and classes
properly. For those, I need to use the linked folder feature, which works
fine. I view Javascript and XML in the Resources perspective.
But, when I start adding the Java to CVS, it does not allow me to add any
of the XML or Javascript. I guess this is because they are linked folders.
1. Is there an easier way to see non-Java files in my project and still
have the benefits of the Java Browsing perspective? That is, is
...\classes the right place to point Eclipse for my project?
2. How can I have one project within which I commit and update Java, XML
and Javascript through CVS?
Thanks,
-Will
|
|
|
Re: accessing non-Java files [message #33403 is a reply to message #32786] |
Wed, 21 May 2003 09:15   |
Eclipse User |
|
|
|
You should point your project to '\webapps\mywebapp', then add
'WEB-INF\classes' as a source folder (see Project->Properties->Java Build
Path->Source)
You will be able to see non-Java files in 'javascript' and 'WEB-INF\xml'
under the project and you will be able to manage them through CVS.
Jerome
"Will Cox" <wrcox@ucsd.edu> wrote in message
news:baeba2$8c1$1@rogue.oti.com...
> Eclipse Platform v2.1.0
> Windows XP
>
> My web application is structured as follows:
>
> \webapps\mywebapp\javascript\*.js
> \webapps\mywebapp\WEB-INF\classes\com\mycompany\myproject\*. java
> \webapps\mywebapp\WEB-INF\xml\com\mycompany\myproject\*.xml
>
> When I set up an Eclipse Java Project, I point it to
> \webapps\mywebapps\WEB-INF\classes. This works fine for Java. I can see
> all the packages and classes in the Java Browsing perspective. However, I
> cannot see my XML and Javascript. I tried pointing Eclipse to
> \webapps\mywebapp, but then I could not see the Java packages and classes
> properly. For those, I need to use the linked folder feature, which works
> fine. I view Javascript and XML in the Resources perspective.
>
> But, when I start adding the Java to CVS, it does not allow me to add any
> of the XML or Javascript. I guess this is because they are linked
folders.
>
> 1. Is there an easier way to see non-Java files in my project and still
> have the benefits of the Java Browsing perspective? That is, is
> ..\classes the right place to point Eclipse for my project?
>
> 2. How can I have one project within which I commit and update Java, XML
> and Javascript through CVS?
>
> Thanks,
> -Will
>
>
|
|
|
Re: accessing non-Java files [message #34333 is a reply to message #33403] |
Wed, 21 May 2003 14:56   |
Eclipse User |
|
|
|
Several people asked me this question today...
How, within Eclipse, can I open a file anywhere on my local machine (i.e.
not part of the project).
Related...if someone mailed me a few .java files, how do I add these to an
existing project?
"Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
news:bafu4r$f0r$1@rogue.oti.com...
> You should point your project to '\webapps\mywebapp', then add
> 'WEB-INF\classes' as a source folder (see Project->Properties->Java Build
> Path->Source)
>
> You will be able to see non-Java files in 'javascript' and 'WEB-INF\xml'
> under the project and you will be able to manage them through CVS.
>
> Jerome
>
> "Will Cox" <wrcox@ucsd.edu> wrote in message
> news:baeba2$8c1$1@rogue.oti.com...
> > Eclipse Platform v2.1.0
> > Windows XP
> >
> > My web application is structured as follows:
> >
> > \webapps\mywebapp\javascript\*.js
> > \webapps\mywebapp\WEB-INF\classes\com\mycompany\myproject\*. java
> > \webapps\mywebapp\WEB-INF\xml\com\mycompany\myproject\*.xml
> >
> > When I set up an Eclipse Java Project, I point it to
> > \webapps\mywebapps\WEB-INF\classes. This works fine for Java. I can
see
> > all the packages and classes in the Java Browsing perspective. However,
I
> > cannot see my XML and Javascript. I tried pointing Eclipse to
> > \webapps\mywebapp, but then I could not see the Java packages and
classes
> > properly. For those, I need to use the linked folder feature, which
works
> > fine. I view Javascript and XML in the Resources perspective.
> >
> > But, when I start adding the Java to CVS, it does not allow me to add
any
> > of the XML or Javascript. I guess this is because they are linked
> folders.
> >
> > 1. Is there an easier way to see non-Java files in my project and still
> > have the benefits of the Java Browsing perspective? That is, is
> > ..\classes the right place to point Eclipse for my project?
> >
> > 2. How can I have one project within which I commit and update Java,
XML
> > and Javascript through CVS?
> >
> > Thanks,
> > -Will
> >
> >
>
>
|
|
|
Re: accessing non-Java files [message #35409 is a reply to message #33403] |
Thu, 22 May 2003 12:31   |
Eclipse User |
|
|
|
Originally posted by: wrcox.ucsd.edu
Jerome,
Thank you for your response. I solved this a different way and it brings
up a larger issue. My *.java files really shouldn't be in
WEB-INF/classes, right? They should be in WEB-INF/src. My current
project puts both *.java and *.class into WEB-INF/classes.
What I did to make it work is as follows: Added /WEB-INF/classes/edu to
the Java Build Path-Libraries and in Java Build Path-Source excluded
WEB-INF/classes/edu (otherwise it complains). That seems to work OK
except that it exhibits a strange behavior. In the Java Browsing
perspective, I cannot edit the source until I've first gone to view it in
the Resource Perspective!?
When I try your way, it immediately tells me that all builds will go into
a MyProject/bin directory. If I say YES. I press OK and it then says
"The output folder has changed. OK to remove all generated sources from
the old location /MyProject".
I'm going to try seperating out the source from the class files
(WEB-INF/src and WEB-INF/classes), and then tell it about each in the
Source and Libraries tabs respectively. Hopefully that will make it happy.
-Will
Jerome Lanneluc wrote:
> You should point your project to '\webapps\mywebapp', then add
> 'WEB-INF\classes' as a source folder (see Project->Properties->Java Build
> Path->Source)
> You will be able to see non-Java files in 'javascript' and 'WEB-INF\xml'
> under the project and you will be able to manage them through CVS.
> Jerome
> "Will Cox" <wrcox@ucsd.edu> wrote in message
> news:baeba2$8c1$1@rogue.oti.com...
> > Eclipse Platform v2.1.0
> > Windows XP
> >
> > My web application is structured as follows:
> >
> > \webapps\mywebapp\javascript\*.js
> > \webapps\mywebapp\WEB-INF\classes\com\mycompany\myproject\*. java
> > \webapps\mywebapp\WEB-INF\xml\com\mycompany\myproject\*.xml
> >
> > When I set up an Eclipse Java Project, I point it to
> > \webapps\mywebapps\WEB-INF\classes. This works fine for Java. I can see
> > all the packages and classes in the Java Browsing perspective. However, I
> > cannot see my XML and Javascript. I tried pointing Eclipse to
> > \webapps\mywebapp, but then I could not see the Java packages and classes
> > properly. For those, I need to use the linked folder feature, which works
> > fine. I view Javascript and XML in the Resources perspective.
> >
> > But, when I start adding the Java to CVS, it does not allow me to add any
> > of the XML or Javascript. I guess this is because they are linked
> folders.
> >
> > 1. Is there an easier way to see non-Java files in my project and still
> > have the benefits of the Java Browsing perspective? That is, is
> > ..\classes the right place to point Eclipse for my project?
> >
> > 2. How can I have one project within which I commit and update Java, XML
> > and Javascript through CVS?
> >
> > Thanks,
> > -Will
> >
> >
|
|
|
Re: accessing non-Java files [message #36377 is a reply to message #34333] |
Fri, 23 May 2003 04:41   |
Eclipse User |
|
|
|
This is not currently possible. See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37935 for more details.
"Paul Duffy" <paduffy@cisco.com> wrote in message
news:bagi4v$1op$1@rogue.oti.com...
> Several people asked me this question today...
>
> How, within Eclipse, can I open a file anywhere on my local machine (i.e.
> not part of the project).
>
> Related...if someone mailed me a few .java files, how do I add these to an
> existing project?
>
>
> "Jerome Lanneluc" <jerome_lanneluc@fr.ibm.com> wrote in message
> news:bafu4r$f0r$1@rogue.oti.com...
> > You should point your project to '\webapps\mywebapp', then add
> > 'WEB-INF\classes' as a source folder (see Project->Properties->Java
Build
> > Path->Source)
> >
> > You will be able to see non-Java files in 'javascript' and 'WEB-INF\xml'
> > under the project and you will be able to manage them through CVS.
> >
> > Jerome
> >
> > "Will Cox" <wrcox@ucsd.edu> wrote in message
> > news:baeba2$8c1$1@rogue.oti.com...
> > > Eclipse Platform v2.1.0
> > > Windows XP
> > >
> > > My web application is structured as follows:
> > >
> > > \webapps\mywebapp\javascript\*.js
> > > \webapps\mywebapp\WEB-INF\classes\com\mycompany\myproject\*. java
> > > \webapps\mywebapp\WEB-INF\xml\com\mycompany\myproject\*.xml
> > >
> > > When I set up an Eclipse Java Project, I point it to
> > > \webapps\mywebapps\WEB-INF\classes. This works fine for Java. I can
> see
> > > all the packages and classes in the Java Browsing perspective.
However,
> I
> > > cannot see my XML and Javascript. I tried pointing Eclipse to
> > > \webapps\mywebapp, but then I could not see the Java packages and
> classes
> > > properly. For those, I need to use the linked folder feature, which
> works
> > > fine. I view Javascript and XML in the Resources perspective.
> > >
> > > But, when I start adding the Java to CVS, it does not allow me to add
> any
> > > of the XML or Javascript. I guess this is because they are linked
> > folders.
> > >
> > > 1. Is there an easier way to see non-Java files in my project and
still
> > > have the benefits of the Java Browsing perspective? That is, is
> > > ..\classes the right place to point Eclipse for my project?
> > >
> > > 2. How can I have one project within which I commit and update Java,
> XML
> > > and Javascript through CVS?
> > >
> > > Thanks,
> > > -Will
> > >
> > >
> >
> >
>
>
|
|
| |
Re: accessing non-Java files [message #37610 is a reply to message #36404] |
Fri, 23 May 2003 18:12  |
Eclipse User |
|
|
|
Originally posted by: wrcox.ucsd.edu
Jerome Lanneluc wrote:
> > My *.java files really shouldn't be in
> > WEB-INF/classes, right? They should be in WEB-INF/src. My current
> > project puts both *.java and *.class into WEB-INF/classes.
> Actually you could have your .java files and .class files in the same
> directory. You need to use a custom output folder for the source folder:
> 1. Check 'Allow output folders for source folders'
> 2. In the list above, expand the source folder
> 3. Select 'Output folder'
> 4. Edit
> 5. Select the same folder
I achieved the same thing by not checking the "Allow output folders..."
and setting the "Default output folder" to be the same as the source
folder. Are there any pros/cons doing it my way vs yours?
> But if you want to separate the source and the compiled classes, that's ok
> too.
> > In the Java Browsing
> > perspective, I cannot edit the source until I've first gone to view it in
> > the Resource Perspective!?
> Not sure what you mean here. Are you saying that you don't see the source in
> the Java perspective?
No, actually, I was seeing it in both but the preprocessor (checking for
warnings and errors) and editor were not working in the Java Browsing
perspective and *were* working in the Resource perspective. Strange.
|
|
|
Goto Forum:
Current Time: Tue Jul 08 18:15:32 EDT 2025
Powered by FUDForum. Page generated in 0.06476 seconds
|