Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Questions about extending Photran

Bob,

I’m not a Photran expert, but I might be able to help you get started.

The first thing to know is that Photran is independent of the rest of PTP, so you only need the org.eclipse.photran plugins in your workspace. You should start by cloning the org.eclipse.photran git repository from http://git.eclipse.org/c/ptp/org.eclipse.photran.git. You will require all the bundles in this repository to be in your workspace in order for them to build correctly. Once you have loaded them into your workspace, you should open the o.e.photran.target bundle and double click on the neon.target definition file. Once the editor is open select the “Set as Target Platform” link in the top right hand corner.

The typical development process is to import the Photran plugins into your workspace, then start a runtime instance of Eclipse that specifies which plugins will be enabled. This is the way you can control which plugins are loaded from your workspace into the running instance, and which are taken from the base Eclipse installation.

I took a quick scan through the code, and it looks like the refactoring is done in the o.e.photran.core.vpg plugin, in the o.e.photran.internal.core.refactoring package. In this package you will see classes like AddIdentifierToEndRefactoring.java, AddOnlyToUseStmtRefactory.java, etc.

Hope this helps,
Greg

On Nov 23, 2016, at 2:23 PM, Bob Apthorpe <bob.apthorpe@xxxxxxxxx> wrote:

Hi,

Since I have some free time over the Thanksgiving holiday, I wanted to take another stab at setting up a PTP development environment and see if I could understand the existing Photran managedbuilder and refactoring schemes. My main goals are to add support for the Intel compiler on Windows, extend the options accepted by the existing ifort and gfortran managedbuilders, and add more Fortran refactorings.

I followed as much of http://wiki.eclipse.org/PTP/environment_setup_90 as I could understand, and have a running PTP development system (Neon; baseline 9.1.1), with org.eclipse.ptp, org.eclipse.remote, and org.eclipse.photran pulled from git. I'm not a Java coder or Eclipse plugin developer so I'm ignoring the overhead and structure of the codebase for now. My rationale is that I'll probably be copying and making minor modifications to start and I can pick up the minutiae later once I see how the current features are implemented.

This may not be the best path since I'm having a hard time finding code that does any actual implementation; most everything I've looked into seems like skeleton code. In the case of managedbuilders, this makes sense since it appears that plugin.properties defines compiler options and descriptions via simple assignments to object attributes or a data structure, and that I'd need to look upstream at org.eclipse.cdt.managedbuilder.core or org.eclipse.photran.managedbuilder.core. This makes sense since the build/link process is pretty well defined and standard across platforms and lends itself to a data- vs code-driven approach.

Contrast this with refactoring, which (I assume) needs actual code to implement source code transformations, rather than the data-driven approach used by managedbuilder. I can find code that talks about refactoring (rephraserengine, vpg) but none of the code that actually does the heavy lifting. Scanning the source tree within Eclipse or the underlying filesystem didn't help so either I haven't pulled the right sources via git or I don't know where I should be looking.

The issues I've identified so far:
- No idea how to build just one plugin vs rebuilding all of Eclipse. No obvious way to start small, modify & test.
- Can't find Photran refactoring implementation code in source tree or file system
- Not sure I have all the source code I need (ses above)

Anyway, I'm willing to put in the work to develop new Photran features but, as the last time I attempted this, it's really rough gaining a foothold. Any direction on where to start with either managedbuilder or refactorings would be greatly appreciated.

Thanks in advance,

-- Bob

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top