分类: Eclipse Coding

  • Eclipse IDE for the Go programming language

    https://github.com/GoClipse/goclipse

    As of 2017, Goclipse is no longer actively maintained, see this blog post for more information. If you are interested in contributing, you can for now fork the project – and there should be enough information here detailing how to build, test, release, etc.

    Build Status
    Gitter

    Developers Guide

    Building the IDE:

    You will need Maven for building Goclipse.

    • To build, run mvn clean verify at the root of the repository. This will run the test suite, and afterwards produce a p2 repository (an Eclipse Software Site) at bin-maven/features.repository/repository.
    • To just build without running tests, invoke mvn clean package.

    Setting up a development environment:

    • You need Eclipse PDE to develop Eclipse plugins. Download and start it.
    • Clone the Git repository.
    • In Eclipse, click “File / Import… “, and then “General / Existing projects into workspace”. Select the Git repository folder as the “root directory”, enable “Search for nested projects”, and select all the Eclipse projects that show up. Click finish to import those projects.

    * Note: The actual project names will be different from those in the screenshot above. * Note: Java compiler settings will be automatically configured, since Eclipse compiler settings are stored in source version control. * Setup the target platform. Unfortunately due to limitations in Tycho/PDE tooling ([more info](https://github.com/tesla/m2eclipse-tycho/issues/29)) some manual steps are required: 1. Open a shell on `target-platform/` and run `mvn package`. This should create a `deps-repository/repository` directory. 1. Copy the target platform file: `target-platform/IDE-base.target` to `target-platform/IDE-gen.target`. (this last filename is already git-ignored). 1. Open `target-platform/IDE-gen.target` in Eclipse, so that it opens under the PDE editor. 1. Click “Add”, then select “Software Site”. 1. On the “Add Software Site” dialog, click “Add…”, then “Local…”, navigate to Git repo directory, then choose the `target-platform/deps-repository/repository` directory. 1. On the “Add Software Site” dialog, the new repository should be selected. Click “Select All” to select all deps, then click “Finish”. It should look more or less like this:

    1. Then finally click “Set as Target Platform”. * Build the workspace ( “Project / Build All”). Everything should build fine now, there should be no errors. * To start the IDE from your workspace: Open “Run / Run Configurations …”. Click on “Eclipse Application” to create a new launch for the plugins in your workspace. The default new configuration that is created should already be ready to be launched. * **Additional tip:** Locate the `bin-maven` folder in the top-level project, open its Properties from the Project Explorer context menu, and mark that directory as “Derived” in the “Resources” property page. This will prevent those folder resources to appear in UI operations such as “Open Resource” for example.

    Running the tests in Eclipse:

    • In releng/launches there is one or several Eclipse launch files for running the tests, so if this project is added to your Eclipse workspace, the launches will show up automatically in Run Configurations..., as “JUnit Plug-in Tests”.

    Creating and deploying a new release:

    A release is a web site with an Eclipse p2 update site. The website may contain no web pages at all, rather it can be just the p2 site. To create and deploy a new release:

    1. Ensure the version numbers of all plugins/features/etc. are properly updated, if they haven’t been already.
    2. Run mvn clean verify to perform the Tycho build (see section above). Ensure all tests pass.
    • To create a signed release the sign-build Maven profile must be activated, and the required properties set.
    1. Create and push a new release tag for the current release commit.
    2. Go to the Github releases page and edit the newly present release. Add the corresponding (ChangeLog.md) entries to the release notes.
    3. Locally, run ant -f releng/ CreateProjectSite. This last step will prepare the project web site under bin-maven/ProjectSite.
    4. To actually publish the project site, run ant -f releng/ PublishProjectSite -DreleaseTag=<tagName>. What happens here is that the whole project site will be pushed into a Git repository, to then be served in some way (for example Github Pages). If projectSiteGitURL is not specified, the default value in releng-build.properties will be used.
    • For more info on the Release Engineering script, run ant -f releng/, this will print the help.
    1. A branch or tag named latest should also be created in Github, pointing to the latest release commit. The previous latest tag can be deleted/overwritten. The documentation pages use this tag/branch in their links.

    Project design info and notes

    LangEclipseIDE

    This project uses the LangEclipseIDE framework, which is designed to have its source embedded in the host IDE. See this section for more info on how this should be managed.

    Extensive Compile-Time type and contract checking

    See https://github.com/bruno-medeiros/MelnormeEclipse/wiki/Extensive-Compile-Time-Checking for more info on this principle.

    Code style:

    • Indent with tabs (tab size is 4 spaces)
    • Max line width: 120
    • Block style:
        if(foo.blah()) {
            doThis();
        }
    
    • Indentation for function arguments: 1 indent unit (= 1 tab):
        foo(one, two, three,
            four, five, six);
    

    There is also an Eclipse formatter profile settings file you can use, although you are not obliged to format with all rules of that formatter settings. If you make a minor source change, don’t format the whole file, but only around the changes you are contributing.

    Unit tests double-method wrapper:

    This code idiom is often used in this project’s JUnit tests:

    @Test
    public void testXXX() throws Exception { testXXX$(); }
    public void testXXX$() throws Exception {

    This is donely solely as an aid when debugging code, so that the “Drop to frame” functionality can be used on the unit-test method. It seems the Eclipse debugger (or the JVM) cannot drop-to-frame to a method that is invoked dynamically (such as the unit-test method). So we wrap the unit-test method on another one. So while we now cannot drop-to-frame in testXXX, we can do it in testXXX$, which basically allows us to restart the unit-test.

    TODO: investigate if there is an alternate way to achieve the same. I haven’t actually checked that.

  • Vim-like editing in Eclipse

    https://github.com/vrapper/vrapper

    Vrapper is an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like input scheme for moving around and editing text.

  • Eclipse SmartHome

    Eclipse SmartHome

    The Eclipse SmartHome project is a proposed open source project under the Eclipse Technology Top-Level Project.

    This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope. We solicit additional participation and input from the Eclipse community. Please send all feedback to the Eclipse Proposals Forum.

    Background

    Since the emergence of broadband internet connections, smartphones and tablets the smart home market shows a remarkable upsurge. This has led to a very fragmented market, which makes it difficult for customers to “bet on the right horse”. In fact, there is not one system, protocol or standard that could possibly fulfill all potential requirements. There is hence a need for platforms that allow the integration of different systems, protocols or standards and that provide a uniform way of user interaction and higher level services.

    Scope

    The goals of the Eclipse SmartHome project can be summarized as:

    1. Provide a flexible framework for smart home and ambient assisted living (AAL) solutions. This framework focuses on the use cases of this domain, e.g. on easy automation and visualization aspects.
    2. Specify extension points for integration possibilities and higher-level services. Extending and thus customizing the solution must be as simple as possible and this requires concise and dedicated interfaces.
    3. Provide implementations of extensions for relevant systems, protocols or standards. Many of them can be useful to many smart home solutions, so this project will provide a set of extensions that can be included if desired. They can also be in the shape of a general Java library or an OSGi bundle, so that these implementations can be used independently of the rest of the project as well.
    4. Provide a development environment and tools to foster implementations of extensions. The right tooling can support the emergence of further extensions and thus stimulates future contributions to the project.
    5. Create a packaging and demo setups. Although the focus is on the framework, it needs to be shown how to package a real solution from it, which can be used as a starting point and for demo purposes.

    Description

    The Eclipse SmartHome project is a framework that allows building smart home solutions that have a strong focus on heterogeneous environments, i.e. solutions that deal with the integration of different protocols or standards. Its purpose is to provide a uniform access to devices and information and to facilitate different kinds of interactions with them. This framework consists out of a set of OSGi bundles that can be deployed on an OSGi runtime and which defines OSGi services as extension points.

    The stack is meant to be usable on any kind of system that can run an OSGi stack – be it a multi-core server, a residential gateway or a Raspberry Pi.

    Currently planned initial features and extension points of this framework include:

    • Data Handling
      • Type System: A basic but extensible type system for smart home data and commands that provides a common ground for an abstracted data and device access.
      • Data Registry: Keeps track of data point instances and their values.
      • Event Mechanism: Passes data and operations asynchronously in a loosly coupled way between components.
      • Bindings: Infrastructure to exchange data and commands with external systems and devices, e.g. through regular polling or background threads. Useful binding implementations such as HTTP, NTP or TCP will be part of the project.
    • Rule Engine
      • An implementation of a flexible rule engine that allows changing rules during runtime.
      • Provides triggering upon events or on a temporal basis.
      • Extensible through rule actions that are made available to all rules
      • Simple but powerful textual representation of rules
    • Declarative User Interfaces
      • A simple way of describing user interface content in a declarative way.
      • Defines a set of standard widgets and a hierarchy of pages.
      • Structure is made available through REST APIs to be easily consumable by UI implementations
    • Persistence Management
      • Infrastructure that allows automatic data processing based on a simple and unified configuration
      • Persistence targets can be anything like databases, log files, IoT cloud services etc.
      • Implementations of persistence services such as logging or cli will be part of the project.
    • REST API
      • Provides all relevant information and services to user interfaces (e.g. native clients)
      • Extensible to provide additional resources specific to a solution
      • Integrates with persistence services to serve time series for interactive charts

    Besides the runtime framework and implementation, the Eclipse SmartHome projects also provides different kinds of tools and samples:

    • Eclipse editors for editing configuration models and rules. These provide full IDE support, such as content assist and syntax validation.
    • Maven archetypes to easily create skeletons for extensions
    • Demo packaging with Eclipse RT

    Planned additions for the future include:

    • Remote management for configuration models, possibly through REST
    • Meta-data based configuration of extensions
    • Definition of rule modules (triggers and actions) that can be easily plugged together
    • Notification APIs to easily administrate notification channels
    • Interfaces for natural language processing / voice recognition

    Why Eclipse?

    Targeting the vertical market of smart homes, this project fits nicely into the recent activities around IoT/M2M.

    Besides this, Eclipse provides many projects that are a perfect fit for this project (and which are in fact used by the initial contribution):

    • Eclipse Equinox is used as the default OSGi runtime.
    • Eclipse Jetty serves as an embedded HTTP server for the REST API and other HTTP services.
    • Eclipse Modelling Framework is the basis for all configuration models
    • Eclipse Xtext provides IDE support for the textual editors and furthermore provides with Xbase the basis for the textual rule representation

    Other Eclipse projects can be of interest in the future as well:

    • Concierge: a small-footprint OSGi container optimized for embedded devices can be an interesting alternative to Equinox when being used on constrained devices.
    • Kura: Lower level services offered by Kura, such as I/O connectivity, remote management and configuration can perfectly complement the Eclipse SmartHome stack.
    • Paho: As an MQTT extension is planned as a communication channel, Paho is the natural choice here.
    • Ponte: Ponte can be used as a uniform way of binding custom M2M devices and solutions to the smart home.

    Initial Contribution

    The initial contribution of the Eclipse SmartHome project will be a large subset of the current code of openHAB (open Home Automation Bus). In particular:

    • Source code for all mentioned interfaces and services of the framework
    • Source code of a couple of extensions (openHAB bindings, actions and persistence services)
    • Documentation of the architecture and its extension points
    • Build scripts and sample files

    Legal Issues

    openHAB is currently available under GPLv3 license. The openHAB project owners will make the code base available under EPL (with the agreement of all contributors). Most dependencies of the openHAB core framework are already under EPL and even taken from Eclipse Orbit. For all other dependencies of the core framework, the project owners will go through the Eclipse legal review process to make sure that they are eligible for contribution.

    Many of the existing extensions (bindings, actions, etc.) include third-party libraries that might not be moved to Eclipse. As a result, only a small subset of these extensions will be contributed to the Eclipse SmartHome project while the rest will stay within the openHAB project.

    Committers

    The following individuals are proposed as initial committers to the project:Kai Kreuzer, Deutsche Telekom AG (Project lead)Thomas Eichstädt-Engelen, innoQ Deutschland GmbH (Project co-lead)Thomas Letsch, Thomas Letsch IT Solutions

    We welcome additional committers and contributions.

    Mentors

    The following Architecture Council members will mentor this project:

    • Mike Milinkovich
    • Benjamin Cabé

    Interested Parties

    The following individuals, organisations, companies and projects have expressed interest in this project:

    • Bastian Nordmeyer, Tinkerforge GmbH
    • Eclipse SCADA
    • Falk-Moritz Schaefer, Communication Technology Institute, TU Dortmund University
    • Georg Grütter, Robert Bosch GmbH
    • Prof. Gottfried Zimmermann, Stuttgart Media University, Responsive Media Experience Research Group
    • Prof. Dr. Heiner Klocke, Cologne University of Applied Sciences
    • Jochen Hiller, Deutsche Telekom AG
    • Lars Pfannenschmidt, Deutsche Telekom AG
    • Dr. Marco Eichelberg, OFFIS Institute for Information Technology
    • Myriam Lipprandt, OFFIS Institute for Information Technology
    • Stefan Feilmeier, FENECON GmbH & Co. KG
    • Stefan Tilkov, innoQ Deutschland GmbH
    • Stefan Vaillant, Cumulocity GmbH

    Project Scheduling

    Eclipse SmartHome aims at the initial contribution to be completed by the end of 2013. A first release is planned early 2014, mainly based on the refactored initial contribution.

    Changes to this Document

    DateChange
    09-August-2013Document created
    19-August-2013Added interested parties
    29-August-2013Added further interested parties
    06-September-2013Added further interested parties
    17-October-2013Added further interested parties
    Changed project name from Smart Home to SmartHome