XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
David KarrSubject: Somewhat unexpected behavior with respect to projects, classpath, and files
Author: David Karr
Date: 15 Nov 2005 07:09 PM
I don't know exactly how I would expect this to work, but I noticed some
unexpected behavior when running an xslt that uses an extension
function, when I had it in a project that has a specific classpath set,
and the global classpath is unset (except for "${classpath}").

When I opened up StylusStudio, it opened up the last file I was looking
at (apparently), but the project that it opened up was not the project
this file is in. I then clicked on the "Preview" button, and it got a
MethodNotFoundException, which confused me, as this had been working
earlier in the day. I realized that I had recently been fiddling with
putting files into projects, and setting the classpath for the project,
and leaving the global classpath empty.

What I noticed is that if I then clicked on the project this file is in,
and then clicked the Preview button, it worked.

From this, I don't know what I would suggest to make this work better.
It might be worth changing the startup sequence so that if the last
opened file is not in the last opened project, it might try to find the
most-recently opened project that contains this file (I'm guessing files
can be in more than one project).

Alternatively, perhaps if SS detects that the file is in a project that
has a project-specific classpath, and that project is not the current
project, it could desensitize the Debug and Preview buttons, with a
tooltip pointing out the issue.

Perhaps a dialog with a Java exception could print "Are you in the wrong
project?" if the project the file is in (you'd have to figure out which
project(s) the file is in) has a project-specific classpath.

None of these are really great ideas. The easiest answer might be to
just ignore me :) .

Posttop
(Deleted User) Subject: Somewhat unexpected behavior with respect to projects, classpath, and files
Author: (Deleted User)
Date: 16 Nov 2005 05:30 PM
David, the easiest answer is rarely the best answer. :)

But, generally, we agree with you: it is hard to know exactly how to address the problem.

Another related problem: If there are two copies of the .class file in the project classpath, and the wrong one comes first, then no matter how many times you recompile your .java file, it still won't work right.

Anyway, as you said, a file can be in more than one project, so there is no concept of a file's project.

- clyde

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.