Re: Lookup & Search Redux

"Geoff Longman" <[email protected]> Mon, 8 May 2006 00:30:00 -0400
Newsgroups gmane.comp.ide.eclipse.spindle.devel
Message-ID <[email protected]>
From the bulder POV all I need to do is ensure that a Resource exists
and open an input stream on it. In addition, if the Resource reps a
physical file (not jar) need to record 'problems'. Eclipse put those
red markers - I'm sure IntelliJ has an equivalent.

Eclipse is easy 'cuz both physical and jar files are represented by a
super interface (IStorage) so I can paramterize some classes to make
them generic enough for the non Eclipse case.

I guess there is always the fallback of realizing concrete instances
of those classes with an Object parameter - ugly but it would cover
anything. This is exacly what I'm dong to get unit tests (outside of
Eclipse) running.

BTW I have made it past the intial assertion checks (not nulls mostly)
and no past the "is this worth building at all?" check - I'm about to
try building the Framework library. yay.

With reference to the other thread - 4.0.3 - I just took a quick look
at Contrib.library and I see :

<meta key="org.apache.tapestry.component-class-packages"
value="org.apache.tapestry.contrib.components"/>

which is bad for me unfortunately - but there are only 4 Components in
that package.

Thing is that Framework and Contrib *used* to be very strict and
*everything* was explicitly declared. Things got loose in T4 timeframe
I guess.

component-class-package is one, of a couple, killer for T4 support. Is
4.0.3 dead for sure?

I'm hoping to get the new Spindle bulder to pass over Framework and
Contrib in the next day or so - could have a list of 'tweaks' by say
wed.

Geoff

Geoff

On 5/7/06, Brian K. Wallace <[email protected]> wrote:
> This is true.
>
> In thinking more on this from Spindle's POV, can you do less than treat
> them the same as any other file? If there's a problem in a jar - even if
> it's not "your responsibility"... if you're trying to use a component -
> regardless of where it's defined - Spindle has to deal with it... right?
> And knowing there's an error in component X in y.jar would let Spindle
> inform the user "I know you're trying to use X, but it's bad".
>
> Am I wrong in that thought?
>
> [I think I'm getting back to your original "need to handle both" thought]
>
> Brian
>
> Geoff Longman wrote:
> > Although, getting an underlier for a Resource in jar does have one
> > general use: existence check.
> >
> > Geoff
> >
> > On 5/7/06, Geoff Longman <[email protected]> wrote:
> >> I agree that recording errors on files in jars is unusual and not
> >> normally done in an IDE.
> >>
> >> It is a useful tool to log the errors during my development. If
> >> Spindle were to say, log an error on the Insert component, I would
> >> instantly know there is a bug in Spindle!
> >>
> >> On another note, is there a 4.0.3 release of Tapestry in the works? I
> >> think, but have to confirm, that the xml for Framework and Contrib may
> >> have to be tweaked so my current Spindle work doesn't go down in
> >> flames. Very minor stuff - mostly the avoidance of using some trival
> >> Tap 4 features that I can't support yet (and may never support).
> >>
> >> Like I said it needs to be confirmed - don't want to start a panic.
> >>
> >> Geoff
> >>
> >> On 5/7/06, Brian K. Wallace <[email protected]> wrote:
> >> > Geoff -
> >> >
> >> >   I'd propose not worrying at all about jars. If there's anything
> >> at all
> >> > wrong in there, it should be caught prior to being jar'ed up. At the
> >> > point where files referred to are in jars, you're in a completely
> >> > different realm.
> >> >
> >> >   My .02
> >> >
> >> > Brian
> >> >
> >> > Geoff Longman wrote:
> >> > > Ok, I'm up to my ears in Search and Lookup again.
> >> > >
> >> > > Lookup is ok. I'm not looking to change it in any way.
> >> > >
> >> > > Search is a bit of a pain. As you recall Search was only going to be
> >> > > used to find any Tapestry files in a project, regardless of their
> >> > > visibility in a classpath like world. Search does not find
> >> Resources,
> >> > > it finds 'files'.
> >> > >
> >> > > I don't want to change that either. :-)
> >> > >
> >> > > Going forward I'll call it 'resource path' instead of classpath -
> >> with
> >> > > the understanding that a resource path works in the same way as
> >> > > classpath*
> >> > >
> >> > > There are a few things that are complicated by this and I'm hoping
> >> > > that a few simple changes can fix it.
> >> > >
> >> > > IProblemPeristManager, you provide an implementation that stores
> >> > > problems related to a Tapestry file. However, currently the
> >> interface
> >> > > methods take Resources and I think this is wrong wrong wrong.
> >> > >
> >> > > Exactly which file a Resource refers to is not fixed. Changing the
> >> > > resource path may mean a completely different file might be
> >> picked up
> >> > > instead.
> >> > >
> >> > > But I think it's important that when problems are persisted, they
> >> are
> >> > > persisted against real files and not Resources. User's work with
> >> real
> >> > > files and it does not make sense for an error marking to jump to a
> >> > > different file just because the resource path changes. This might
> >> > > introduce another problem - error on files that Tapestry would no
> >> > > longer see - but I'm going to add a "rule for implementors' that
> >> will
> >> > > prevent this**.
> >> > >
> >> > >
> >> > > So in the current code Search and ISearchAcceptor work on Objects
> >> > >
> >> > > I'm changing IProblemPeristManager to work with only
> >> ITapestryProjects
> >> > > and Objects too.
> >> > >
> >> > > So, what if all you have is a Resource and you want to record an
> >> > > error? Luckily ICoreResource has the method getUnderlier(). When you
> >> > > implement your Resource classes getUnderlier() is supposed to return
> >> > > the underling file that the Resource represents.
> >> > >
> >> > > So I think that will work out ok.
> >> > >
> >> > > But, having these classes and interfaces work with Objects is a bit
> >> > > clunky. Why not just uses java.io.File objects? Well, I don't
> >> know how
> >> > > IntelliJ represents source files but Eclipse does not used
> >> > > java.io.Files! It uses org.eclipse.resources.IFile's for physical
> >> > > files and another class altogether for files in jars.
> >> > >
> >> > > Since the decision to tie the core to JDK 1.5 was made a long time
> >> > > ago, why not parameterize these interfaces and let the IDE
> >> implementor
> >> > > decide?
> >> > >
> >> > > This works fine for me an Eclipse as the is one super interface
> >> > > (org.eclipse.resources.IStorage) that is the super interface of
> >> IFile
> >> > > and the jar file class.
> >> > >
> >> > > My question is: Does this paramterization Iimit you, Hugo? Is
> >> there an
> >> > > equivalent super interface in IntelliJ that can represent both a
> >> > > physical file and one found in a jar?
> >> > >
> >> > > One could argue that it's pretty difficult to 'mark' a file in a jar
> >> > > and it might also be argued that since one can't edit the file
> >> anyway
> >> > > why bother?
> >> > >
> >> > > Thoughts?
> >> > >
> >> > > Geoff
> >> > >
> >> > > *Works the same way as classpath in that some files may be hidden
> >> > > depending on the structure of the classpath. The term 'Resource
> >> path'
> >> > > is more generic as there is no reason why the context resource path
> >> > > may not be implemented in a classpathy way.
> >> > >
> >> > > **The rule is simple, if the resource path changes (context or
> >> > > classpath), simply throw out any build state including any error
> >> > > markings, and build again.
> >> > > --
> >> > > The Spindle guy. http://spindle.sf.net
> >> > > Blog:                  http://jroller.com/page/glongman
> >> > > Other interests:  http://www.squidoo.com/spaceelevator/
> >> > >
> >> > >
> >> > > -------------------------------------------------------
> >> > > Using Tomcat but need to do more? Need to support web services,
> >> security?
> >> > > Get stuff done quickly with pre-integrated technology to make
> >> your job
> >> > > easier
> >> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> > > Geronimo
> >> > > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> >> > > _______________________________________________
> >> > > Spindle-developer mailing list
> >> > > [email protected]
> >> > > https://lists.sourceforge.net/lists/listinfo/spindle-developer
> >> > >
> >> >
> >> >
> >> > -------------------------------------------------------
> >> > Using Tomcat but need to do more? Need to support web services,
> >> security?
> >> > Get stuff done quickly with pre-integrated technology to make your
> >> job easier
> >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> Geronimo
> >> >
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > _______________________________________________
> >> > Spindle-developer mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/spindle-developer
> >> >
> >>
> >>
> >> --
> >> The Spindle guy. http://spindle.sf.net
> >> Blog:                  http://jroller.com/page/glongman
> >> Other interests:  http://www.squidoo.com/spaceelevator/
> >>
> >
> >
> > --
> > The Spindle guy. http://spindle.sf.net
> > Blog:                  http://jroller.com/page/glongman
> > Other interests:  http://www.squidoo.com/spaceelevator/
> >
> >
> > -------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
> > _______________________________________________
> > Spindle-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/spindle-developer
> >
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Spindle-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spindle-developer
>


--
The Spindle guy. http://spindle.sf.net
Blog:                  http://jroller.com/page/glongman
Other interests:  http://www.squidoo.com/spaceelevator/


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642