/*
 * Perfclispe
 * 
 * 
 * Copyright (c) 2013 Jakub Knetl
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.perfclipse.ui.gef.parts;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.draw2d.IFigure;
import org.perfclipse.model.DestinationModel;
import org.perfclipse.ui.gef.figures.PerfCakeRoundedRectangle;

public class DestinationEditPart extends AbstractPerfCakeNodeEditPart {

	public DestinationEditPart(DestinationModel destinationModel){
		setModel(destinationModel);
	}
	
	public DestinationModel getDestinationModel(){
		return (DestinationModel) getModel(); 
	}
	@Override
	protected IFigure createFigure() {
		PerfCakeRoundedRectangle figure = new PerfCakeRoundedRectangle(getDestinationModel().getDestination().getClazz());
//		figure.setPreferredSize(EMPTY_WIDHT, EMPTY_HEIGHT);
		return figure;
	}

	@Override
	protected void createEditPolicies() {
		// TODO Auto-generated method stub

	}
	
	//TODO: remove string destination model
	@Override
	protected List<Object> getModelChildren(){
		List<Object> modelChildren = new ArrayList<Object>();
		modelChildren.add(getDestinationModel().getDestination().getClazz());
		return modelChildren;
	}

}

@@ -823,24 +823,23 @@
 figures.
-PerfCake
+Labeled
 RoundedR
@@ -1162,24 +1162,23 @@
 e() %7B%0A%09%09
-PerfCake
+Labeled
 RoundedR
@@ -1199,24 +1199,23 @@
 e = new 
-PerfCake
+Labeled
 RoundedR
@@ -1449,49 +1449,8 @@
 %7D%0A%09%0A
-%09//TODO: remove string destination model%0A
 %09@Ov
@@ -1500,16 +1500,16 @@
 dren()%7B%0A
+
 %09%09List%3CO
@@ -1560,80 +1560,8 @@
 ();%0A
-%09%09modelChildren.add(getDestinationModel().getDestination().getClazz());%0A
 %09%09re

Use LabeledRoundedRectangle