Posts

Showing posts with the label project

Eclipse Plug-in Development:Working with Project Facet

Image
Every project may have one or more natures. Each nature brings set of properties to the project.For example a Java project has “src” directory and “bin” as build directory or you may want to associate a set of libraries to your custom project. Faceted Project Framework provides a powerful mechanism for extending the capabilities of the Web Tools Platform. Project facets are typically used as a way of adding functionality to a project. When a facet is added to the project it can perform any necessary setup actions such as copying resources, installing builders, adding natures, etc. Facets can also be used as markers for enabling user interface elements. This post explains defining a facet and using it. Prerequisites : Install WST eclipse plug-in Add dependencies to MANIFEST.MF Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Sample Bundle-SymbolicName: com.facet.sample; singleton:=true Bundle-Version: 1.0.0 .qualifier Bundle-Activator: com .facet .sample .Activato...

Eclipse PDE: Everything about Editor

Image
Editors are the most important part of eclipse IDE framework. Editor are the primary framework to create and modify resource like files. Every eclipse plug-in or eclipse based products needs to provide custom editor for editing proprietary resources. I am tried to put important parts of Eclipse Editor Framework in this pos. This is the first post from the series "Everything About Editor" Everything about Editor Document Partition Syntax Highlighting Auto-Edit Strategy Code Completion using Content Assist Eclipse divides the concept of a text editor into two parts: the document and the viewer. While the document holds the actual content of the editor, the viewer is responsible for handling the content display. This nice Model-View-Controller (MVC)-style separation allows you to separate code that manipulates the content of the editor from the part that manipulates its display. The Document represents the "model" part of the text editor framework. It c...

FileVisitor from NIO.2 File System API in Java 7

As a part of project Coin ( Language changes ) in Java 7 improved version of file operation APIS has introduced, java.nio.file . There are many new functionalities has been introduced for ease of day to day programming, FileVisitor is one these APIs. As explained above, new interface java.nio.file.FileVisitor has been introduced for traversing the file system. It has methods like preVisitDirectory(), postVisitDirectory() , visitFile () etc to give control to programmer to do any specific task while traversing/visiting the file system. A concrete  implementation java.nio.file.SimpleFileVisitor has been provided those don't want to provide implementation for all of the methods from java.nio.file.FileVisitor . Here is simple example using these new classes.   package com.test.jdk7; import java.io.IOException; import java.nio.file.FileVisitResult; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor; import java.nio.file.att...