Sirius diagram updation through Xtext editor - xtext

I am using my own resource which is not of type XMI Resource.If I create Eobjects in Sirius diagram editor it is reflecting in Xtext editor but vice versa is not working .If I try to edit any elements short name in Xtext editor Sirius diagram is lost. I feel my diagram is lost due to Resource is not able to get the updated element based on URI fragment. Plaese help me how i can get the updated element URI fragment so that diagram should not get lost.

When you save your Xtext editor, it triggers a reload of the resource by Sirius (they do not share the same editing domain or resourceSet).
During the load, your resource creates a new model in memory. The elements previously known by Sirius cannot be retrieved: you modified an attribute which impact the URI fragment. The Sirius graphical elements reference the old elements.
If you launch a refresh (from the tool bar of the diagram), it might retrieve some content but the layout will be lost as the (re)loaded model is a new set of objects.
You mid find some hints in the following resources:
White Paper on Sirius and Xtext
Talk Integrating Xtext and Sirius: Strategies and Pitfalls: video, slides
Blog post presenting several ways to from the Sirius editors or the properties

Related

TFS Work Items: Workaround for dashboard widgets unable to show tree of work item type queries

We have a work item structure in TFS 2015 (Will soon be upgraded to 2017, in case there are features there which may be relevant) which consists of the usual CMMI template hierarchy: Epic->Feature->Requirement (Where requirement is roughly analogous to PBI in other templates, for those unfamiliar)
We have abstracted the large body of work by making Epic and Feature meaningful. Applying a common analogy, an Epic->Feature->Requirement in this setup for a requirement on a webpage might be [Security]->[Password Management]->[Password Complexity rule xyz]
The main problem is that, while the 'tree of work items' type query is powerful and useful for this setup, some features of TFS only work on flat list of work item type queries, including dashboard widgets. Continuing the example above, if I wanted to create a widget to see how many Security Requirements (PBIs) were completed, I could not do that.
I'm looking for ideas on how to get around this restriction in VS2015 or VS2017, and the best solution I can think of so far is to create a service hook which uses the TFS api to traverse the tree and then copy the title or ID of the parent Epic/Feature onto the Requirement in some dummy field. This seems very clunky and inelegant. Another option would be to mirror the Epic/Feature hierarchy in Areas, but this is quite unfavorable as we use the Area for another purpose and it creates a maintenance problem as they would need to be kept in sync.
There is Query Results and Chart for Work Items widgets that can uses Tree of work items in TFS 2015, but can’t just count the children work items (e.g. Requirements)
You can build a custom widget extension and retrieve the corresponding work items through REST API and count related work items.
There is a sample with detail code of how to retrieve the data through REST API, so you can refer to this article to build a custom widget extension: Add a dashboard widget

Orbeon: getting all input fields to display

I'm trying to use Orbeon 3.9 CE to create an editor for XML documents. I've hit a problem in that the xforms fields I've created for the various attributes don't show up in the web form if the existing input XML document does not have them. I've searched Stack Overflow and the Orbeon doc and wiki but haven't been able to find a setting to fix this.
This is implemented according to the specification: if the ref resolves to an empty sequence (or "empty nodeset" in the XPath 1.0 parlance used by the XForms 1.1 spec), then the control is considered non-relevant. There is no provision for having the node created automatically if missing. So this would need to be done either:
Outside of XForms, in a phase of pre-precessing of the XML to add missing element or attributes.
In XForms, after the instance is loaded, by inserting nodes in the instance as appropriate.
Unless you need to add just a few nodes, the first option is most likely more appropriate.
#avernet's response is correct.
Somebody asked a similar question on this thread.
The recommendation I made was to create an XBL component to handle this automatically. I suggested a first version of such a component, more as a suggestion than as a final, usable solution. But that might help you.

Building a site with Orchard CMS

I'm in the early stages of trying to learn Orchard, and I'm still seem to be struggling with the basics on how to build a page containing a multitude of various content that can be easily managed by non-technical users.
Ideally, what I'm trying to do is the following, I just can't figure out how to fit it into the Orchard architecture using Content Types, Parts, Fields, Widgets, Zones, etc. Also, since I'm still learning, I'm also trying to avoid any custom modules, or hard-coding content into the site (though I'm open to the idea, if that's the best way to get it done!).
Goal: Create a "home page" layout containing a Menu, Image slideshow, and several feature descriptions. For each image in the slideshow, I need a title, sub-title, description, and an image. To make this easy for non-technical users to manage, I would like to define the HTML template (custom Content Type, Part, or whatever), and allow authors to specify just those well-defined properties. I tried using Content Parts for this, but unfortunately, I can only have one Content Part of a particular type on a piece of Content. I also saw recommendations to create multiple Content Parts with the same set of properties, but I don't know how many images will be displayed (and I don't want to assign an arbitrary number).
I need to do something similar for feature descriptions, allowing authors to specify an image, title, description, and a page to link to. I'm running into the same problem as above, I'm not sure how to allow authors to specify a finite list of content, but have each content item be well-defined.
So far, the best option appears to be creating some sort of custom widget to "host" the content, but for some reason, my gut tells me that creating a custom layer for a single page just to specify which content to display is abusing the purpose of layers, which is begin able to customize a particular layout based on some criteria (whether or not the user is authenticated, for example).
I hope that made sense, and I apologize that it took so many words to explain my issue, I've just really reached my peak of frustration, and although I think that the Orchard guys definitely have it figured out in terms of architecture, I just can't get past these seemingly simple problems to build a simple website.
I greatly appreciate any tips, suggestions, advice this community has to offer!
TIA, -Jeremy
What you defined in Orchard terms is a Content Type named Feature.
Go to Contents -> Content Type, and click Create.
Select those parts by default:
Title, because you want your authors to provide a nice title/name for the features
Autoroute, which will create a SEO friendly url based on the Title (can be customized)
Click Save
Add specific Fields
SubTitle, of type TextField. Configure it to Default, Required.
Description, of type TextField. Configure it to TextArea, Required.
Image, of type Media Picker. Configure it to Required.
You can add some Hints to each fields, which will be displayed in the Feature editor to describe what to enter in each field. Very useful for authors.
Now you can create Features by clicking on the link in the top left part of the Dashboard.
Next step is to put those features on the homepage. What I suggest is to create a Projection which will be set as the homepage. A Projection is just a Page with an Url, which will display the result of a query as its content. The Query in your case will be "Give me all Features ordered by Creation Date".
In the dashboard, click on Queries
Click on "Create a new Query"
Enter "All Features"
Click on "Add a new Filter"
Select Content Type, then select Feature, Save
Click on "Add a sort Criterium"
Select "Creation Date", then Descending, Save
At this point, you can already preview the result of the query by clicking on Preview. But what we want is a front-end page.
Create a new Projection by clicking on Projection in the "New" section of the dashboard (top left again)
- Give it a title, and don't forget to check "Set as Home page" to make it the home page
- Select the only available query, named "All Featrues"
- Save
On the home page you should see all the features, ordered by date. But what you want is a slider. At that point you need two more steps:
- Integrate a slider jQuery plugin
- Render the HTML compatible with your jQuery plugin
By default, when you render a Projection it will use the standard "Summary" layout. But using projections you can decide exactly what layout you want to apply, and exactly what html tags and classes.
Edit the query named "All Features"
Add a new Layout
Select Html List
Select "Properties" and Save
Click Add Properties
Select Display Text, Save
Do the same for
Feature:SubTitle
Feature:Description
Feature:Image
Save your query
Edit the home page projection and select this specific Layout instead of the default one.
You will see that each property is rendered in an html container.
By editing each property you can decide which class to apply, and which html tag to use. By changing them you can render exactly what you want, and customize your CSS/HTML to render the slider nicely. This is purely your HTML know have to apply here, or find some articles about that.
For your editors, they just have to go to the dashboard and add/update some feature content items, it will be reflected on the website.
Optionally there is a Slider module on the Orchard Gallery. You can try this one too. But if you want to handle exactly what happens the technique I described is better.
I've just gone through this exact scenario myself. I think that what you want can be accomplished using Orchard Lists. The UX is not exactly intuitive for the end user, but it seems like it's the most straightforward way to accomplish this goal without installing/developing a custom module.
First, make sure you're using Orchard 1.4 because you'll need the built-in support for generating alternates for Container Widgets for each zone. Enable the Shape tracing, Url alternates and Widget alternates modules.
Now, create a list of items as described in the documentation (see http://docs.orchardproject.net/Documentation/Creating-lists). Translate "book review" into "slide" and "book reviews" into "slides" and you get the idea. You can add custom fields to represent your subtitle, description, etc. I'd just keep the image as part of the content itself instead of creating a custom field for it.
If you've followed the steps in the documentation, you should now be seeing a list of your slides rendered as ul/li's. Now you'll want to customize how things are rendered so you can show your custom fields and generally customize the tags. Use the shape tracer and create alternates for the list as you see fit. Now you're free to control all the rendering. See http://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx and http://weblogs.asp.net/bleroy/archive/2011/05/23/orchard-list-customization-first-item-template.aspx for ideas.
Managing this list from your end-user's perspective is actually quite easy, but I don't really feel that it's very intuitive.
It took me three days of digging through blogs and docs to figure this out for myself.
I'd also recommend this wonderful module called Featured Item Slider. It has all the basic functionalities of a slideshow, including all mentioned in the question, plus some fantastic additional capabilities, such as different animations. You can also fine tune the layout and styling by providing additional css. Get the source here. And here is the slideshow in action. If a module already exists providing the functionality you're looking for, then it's best to use that rather than reinvent the wheel, unless you do it for learning purposes.

Can I create hierarchial Requirements document using TFS query or TFS Report

I am exploring feasibility of using TFS for software process on our next project. One need is to be able to create a requirements document from individual linked requirements within TFS. I've currently got mock-up projects in both Agile and CMMI with a set of requirements linked with parent child relationships. I can query these requirements in both Agile and CMMI but the result doesn't show the hierarchy. With CMMI I can run the report "Project Management::Requirements Progress" which shows requirement titles with indention based on hierarchy. It doesn't however show the detailed descriptions
What I'd like is to auto generate a Word document with hierarchical headings based on TFS requirement work items and their parent/child relationships.
Also to generate rich text and drawings from the TFS requirement Work Item descriptions. So a secondary question is how to change the description field in the Requirements Work Item to support rich text so that the reports can use it. If I try to edit the Task Work Item Description field it warns me that continuing to save may make file unloadable.
To support RichText in your work items you need to edit your work item definition by Work Item Editor wihch can be found in the TFS Power Tools thingy. You should add a new custom rich text field and use that field for your descriptions. (The downside is, Excel plug-in does not support editing richtext fields.They are read-only in Excel)
For printing work items, I had to improvise solution and worked pretty well for me. I used the "Mail Merge" functionality of MS Word and designed a word document. After that I prepared a SQL query that takes the needed field values from TFS Warehouse. Rest is done by MS Word. Mail Merge prepares a single document for each work item record. They are separate documents but it does the trick I suppose.
For creating a hierarchy I think you need to go a little deeper. Since TFS supports parent/child relationships but does not follow any particular sort order, I suppose another custom field is needed. You can either use the field to give hierarchy tokens manually (1.1, 1.2, etc.) or you can develop a little custom command line utility to traverse the work item tree and autoset values for the mentioned custom field.

Extending Blogpost Contenttype in Sharepoint 2007

Has anybody ever used blogpost contenttype and extended it and added some column to it. I know we can add columns to it using the GUI (List Setting).
Can we do this declaratively and add it to the portal using feature, so that we can create a deployable solution.
Paddy
I have not tried this, but I don't see any reason why you couldn't. The only thing that gives me pause is that Blogs are a little different than most lists because the List Definition is not in a Feature but is rather part of the Site Definition. You could create a Feature with your custom Content Type and staple it to BLOG#1. However, you will still need something (probably a Feature Receiver) that will modify the instance of the Posts lists by adding your custom columns and associating your custom Content Type.

Resources