Project

General

Profile

« Previous | Next » 

Revision e378d285

Added by Patrick Plitzner over 6 years ago

ref #6595 Update part name with changes

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
26 26
import org.eclipse.e4.ui.di.Focus;
27 27
import org.eclipse.e4.ui.di.Persist;
28 28
import org.eclipse.e4.ui.model.application.ui.MDirtyable;
29
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
29 30
import org.eclipse.e4.ui.services.EMenuService;
30 31
import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
31 32
import org.eclipse.jface.dialogs.MessageDialog;
......
117 118
	@Inject
118 119
	private MDirtyable dirty;
119 120

  
121
	private MPart thisPart;
122

  
120 123
    private TaxonEditorInputE4 input;
121 124

  
122 125
    private UndoContext undoContext;
......
128 131

  
129 132

  
130 133
	@PostConstruct
131
    public void createPartControl(Composite parent) {
134
    public void createPartControl(Composite parent, MPart thisPart) {
135
	    this.thisPart = thisPart;
132 136
        if (CdmStore.isActive()){
133 137
            if(conversation == null){
134 138
                conversation = CdmStore.createConversation();
......
152 156
			@Override
153 157
			public void dirtyStateChanged() {
154 158
			    dirty.setDirty(true);
155
			    //FIXME E4 migrate
156
//				firePropertyChange(PROP_DIRTY);
157 159
			}
158 160

  
159 161
			@Override
......
189 191
		parent.setLayout(layout);
190 192
		parent.setBackground(AbstractUtility
191 193
				.getColor(Resources.COLOR_COMPOSITE_BACKGROUND));
192

  
193
        //FIXME E4 migrate
194
//        viewer.addSelectionChangedListener(selectionChangedListener);
195

  
196 194
	}
197 195

  
198 196
	public void createOrUpdateNameComposites() {
......
386 384
        createOrUpdateNameComposites();
387 385

  
388 386
        setFocus();
387

  
388
        setPartName();
389 389
	}
390 390

  
391 391
	//FIXME E4 migrate drag support
......
611 611
        // if the attribute is null then do not set the dirty flag -> hotfix for the problem that for tasks done in service methods the changes are saved automatically
612 612
        if (element != null){
613 613
            dirty.setDirty(true);
614
            //refresh part title
615
            //TODO: refresh taxon node in taxon navigator
616
            setPartName();
614 617
        }
615 618

  
616 619
        if (element instanceof TaxonBase) {
......
625 628
                container.refresh();
626 629
            }
627 630
        }
628
        //refresh part title
629
        //TODO: refresh taxon node in taxon navigator
630
        //FIXME E4 migrate
631
//        setPartName();
631
    }
632

  
633
    public void setPartName(){
634
        thisPart.setLabel(taxon.toString());
632 635
    }
633 636

  
634 637
    @Override

Also available in: Unified diff