bingshui.org

the Life of Zim

13th November
2008
written by dzimney

I’ve finally found the Eclipse prefs file that stores the local file path to linked resources (linked libraries). Linked resources are basically shortcuts to files/folders on your local system. Buried in the Workspace/.metadata/.plugins/loc.eclipse.core.runtime/.settings/ folder (on OS X), the loc.eclipse.core.resources.prefs file contains the absolute paths to those linked libraries.

A few months ago I began working with Ant tasks in Eclipse. Specifically, I was using fdtkit along with Ant in Eclipse to generate JavaDocs for my Actionscirpt 2.0 libraries using as2api. For the most part fdtkit is a fabulous tool, or rather toolbox for generating JavaDocs and numerous other tasks with the use of Ant. However, the issue that I very soon found myself confronted with was documenting classes from linked libraries in Eclipse. Normally I will set up a project with a src containing code specific to that project, and then make use of linked libraries to make use of code from other projects/api’s. When running an Ant task to create my JavaDocs I was unable to intelligently identify the paths to my linked libraries to add to the documentation.

The way Eclipse and FDT handle linked libraries is through the IDE and the .project file found in the root of the project folder. Opening the .project file, you might see something like this (assuming you are using linked libraries):

<link>
<name>core</name>
<type>core</type>
<locationURI>FP8</locationURI>
</link>

Looking at the link object, you will see two important pieces of information the name property and the locationURI property. Now the name property represents the name associated with the linked library (obviously) and then there’s the locationURI. The locationURI is a reference to the linked resource. The problem here is where the hell is the identity of that locationURI? In the Eclipse IDE you can select a linked library in the Explorer view and then examine it with the properties view. Here you will see the value for the resolved location, which is the full, absolute path to the linked library on your local system. But how the hell to I get that property with Ant? How to I access it all? Well, I’ve been asking that question for quite some time, scouring the Internet and finding nothing. Today, I found my answer.

Determined to know how linked resources were being saved on my system I began digging deep in the my Eclipse folder to find property in some buried file. Note, I’m running Eclipse 3.3 on OS X. I would imagine the path is similar on Windows, but probably not exactly the same (I’m guessing it’s pretty damn close to the same in Linux). Anyway…

The file location is: ${your_eclipse_workspace_folder}/.metadata/.plugins/loc.eclipse.core.runtime/.settings/loc.eclipse.core.resources.prefs
This file looks something like:

pathvariable.FP7 = /Users/local/Workspace/fdtkit/lib/FP7
pathvariable.FP8 = /Users/local/Workspace/fdtkit/lib/FP8
pathvariable.FP9 = /Users/local/Workspace/fdtkit/lib/FP9

So now, through Ant task it is possible to have your build.xml (relative to your project) parse the .project file of the project for linked libraries and with the locationURI parameters to grab the absolute path to the class library from the loc.eclipse.core.resources.prefs file.

Please feel free to contact me if you have any questions regarding this post. I’m sure this isn’t the most straight forward explanation of what I’ve found here, but I’m a little to jacked up on coffee to form clear coherent thoughts right now.

Note: Linked resources are Workspace specific. Different workspaces have a different set of linked resources.

12th November
2008
written by dzimney

12th November
2008
written by dzimney

Well it’s officially been a week since my last cigarette. I’ve been feeling pretty easy with it, but honestly I kind of miss smoking sometimes. Which is interesting because it’s really the first time I’ve felt like that while quitting. Sure there are cravings and all that, but it’s different than missing it. I’m not exactly sure how to explain it, but it’s the difference between wanting something and needing something. At this point I’m not really feeling like I need a cigarette. I suppose I really don’t feel like I want one that much. The idea of it is really not all too appealing. But the idea that I can’t ever have a cigarette again, ever. That makes me miss it a little. I guess just because I’ve lived with it for so long. And there’s the rub.

Overall I feel pretty good about quitting. Finally feel like it’s really working. If you hadn’t read to post below I quit “for Obama” so to speak. I like to think of it as quitting for all the causes that Obama stands for and that I hope come to light in the next four to eight years. More over I’m quitting for a cause though. Like a marathon or something, except instead of walking/running/biking (or whatever) I’m “fasting” so to speak. But it’s for a higher cause, which makes it easier or rather harder to start again. It’s the permanent part that I think I’ll be having a bit of a problem with. But if there’s one thing I’ve learned about quitting smoking, it’s that it only works if your really quit. There’s just never a point where you can successfully say, “oh, I can have just one.” Not for me at least.

Tags:
11th November
2008
written by dzimney

Click to enlarge image

more maps ›

Tags:
6th November
2008
written by dzimney


Well I’ve been try my hand at quitting smoking again. My inspiration? Barack Obama. About a week ago I decided that if Barack won the election, I would quit smoking. Not like I was making a deal with the world, that if the world helped to get Barack in office, I would return the favor by quitting smoking. The idea behind it was simple. Obama quit smoking shortly before he began running for President. He made a sacrifice along with many others in order to get to where he is today. And in my support for Barack and as I’ve been inspired by him, I’ve decided to quit. Almost as a “thank you” to Obama for his sacrifices. I know it might sound lame, but that’s been my inspiration. And honestly it’s one of the greatest inspirations I’ve used in quitting smoking. I’ve tried for others in my life and I’ve tried for myself, but this time I’m quitting for an idea and a symbol (with a living person behind it). It’s been a lot easier to say no to my desires for smoking when I just think about the fact that I’m doing it for Obama and myself. Hope for the future. Again, I know it sounds pretty lame. But I’m closing in on day two. It’s been going well so far, and although I’m not guaranteeing it to last (I hope it does though) I feel pretty good about the choice to quit and how it’s gone so far.

Tags:
5th November
2008
written by dzimney

Last night the nation made history as it elected Barack Obama as the 44th President. Unlike the past eight years, this election wasn’t even close. Obama won with 349 of the electoral college, leaving McCain with only 147. In terms of the popular vote, Obama had 62,816,357 (52.3%) to McCain’s 55,656,309 (46.4%). Which isn’t unbelievably close with only a six point spread, looking at popular vote, but a hell of a lot closer than any election I’ve been able to vote in.

In election news the House and the Senate are both held in majority by the democratic party. Senate seats are 56 (Dem) to 40 (GOP) and the house is 252 (Dem) to 173 (GOP). It’s wonderful to finally see this country saying enough is enough. We don’t like what’s going on here. We want a change and we want it now. I can’t wait until Barack gets inaugurated. We’ve still got Bush for two more months, which is honestly way, way, way too much time for that stupid f@&ker to be in office. But change is here. The people have spoken.

Unfortunately in Minnesota politics, it looks like we’ve got Norm Coleman’s crooked ass in office for another six years. I hate Norm Coleman. He represents everything wrong with the Republican party right now. A whole lot of doing nothing write in getting anything done, and doing a lot of work in getting in the way of people doing the right thing. And we’re “probably” going to get the s.o.b. for another six years! Minnesota voted 54%-44% Obama. and yet have a tie with Coleman/Franken. Why? Because Franken is a hot head and used to be on SNL. I’m honestly not a huge fan of Franken or anything, but I hate Coleman. So am I disappointed that a man named Barkley ran as a third party candidate taking up 15% of the vote? Yes, overall yes, I am. Why? Because 15% is nowhere near enough to take office, but it’s plenty to jack everything else up pretty damn well. Consider this, you could very safely say that a most people who voted for Barkley would have voted for Franken. Take a small majority of Barkley’s 15% and give it to Franken, and there’s the election. Is the system flawed? Is Barkley flawed? Are the voters flawed? I’d say a bit of everything. But regardless of who’s fault it is, I’m just pissed that we’ve got Coleman for another six years.

Enough ranting. OBAMA!!

4th November
2008
written by dzimney

Just finished voting. Super kick-ass-a-ma-tastic!
GO OBAMA!!

28th October
2008
written by dzimney
Get the latest news satire and funny videos at 236.com.
28th October
2008
written by dzimney

28th October
2008
written by dzimney

Looks like FOX “News” is at it again. They had Obama’s campaign spokesman Bill Burton on to defend a statement accusing Fox of, “false, desperate attacks.” Now of course Fox replied with the “fact” that they are “fair and unbiased” while of course cutting off and talking over Bill Burton as much as humanly possible. The exchange is pretty entertaining, but also disturbing. Disturbing because it’s suck a blatant example of how unfair and biased Fox really is. How exactly is it fair and unbiased to constantly cut of your interviewee and attempt to make your own opinions known more than theirs? Especially when your point is that you are unbiased? What is more disturbing is the fact that people watch Fox News, they’ve seen this interview and plenty like it, and continue to view Fox News as “fair and unbiased”. Why? Because Fox News has told them they are fair and unbiased thousands of times over. If you hear something enough times, you start to believe it, I guess. But even with this excuse it disturbs me that people are so illogically equipped to overcome such a brain washing. It’s like if I told you a thousand times that I wasn’t going to slap you in the face, slapped you in the face, and then when asked if you were slapped you said, “He’s not going to slap me in the face.” Except that I’m constantly slapping and saying I won’t slap. Good thing stupid people can’t vote… wait a minute?

Tags: