Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » B3 » proposal for "include"
proposal for "include" [message #492133] Mon, 19 October 2009 01:22
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
We want to be able to include elements from other b3 files.

A unit can name advice and property statements (with the purpose of
making it possible to include them.

The required information is:
- from where
- element type (advice, properties, etc.)
- element name

Element Type
---
This is the simplest to handle. It makes most sense to place an
'include' statement inside an element of a particular type - i.e.

advice {
import ...
}
would import advice

and
properties {
import ...
}

would import properties.

Element Name
---
This is also straight forward, just state the name of the thing to import

properties {
import a;
}

From Where
---
Now it becomes interesting. Technically we can use a "File or URL"
reference to a b3 file. But we could actually refer to antyhing that
represents a b3 model - such as an Ecore b3 instance.

It is likely that multiple things are included in different places and
it is wasteful (and difficult to replace) if each import statement
should state the location of the model instance (b3 file or something else).

This means that includes should be declared at the unit level, and then
refered to where inclusion of some element should take place.

I can imagine doing this via "import" outside of the unit declaration.
An import of a b3 model would make it available for referencing.

import "http://myorg.org/buildserver/main/common.b3"

and then a property set called "a" is referred to as
properties {
include common.b3, a;
}

or, if we feel that import is reserved for importing classnames, the
global 'include' statement could make the model available (perhaps under
an alias).

include common = "http:.,...."
propertues {
include common, a;
}
or
properties {
include common:a;
}

XText has nice functionality for handling this, so it would not be too
hard to provide code completion and linking.

Thoughts ?
- henrik
Previous Topic:proposal for "include"
Next Topic:b3 and repository handling
Goto Forum:
  


Current Time: Sat Apr 20 15:02:10 GMT 2024

Powered by FUDForum. Page generated in 0.02636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top