01: /*
02: * JSFConfigContextImpl.java
03: *
04: * Created on February 9, 2007, 11:18 AM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.netbeans.modules.web.jsf;
11:
12: import java.io.Serializable;
13: import org.netbeans.modules.web.jsf.api.editor.JSFConfigEditorContext;
14: import org.openide.awt.UndoRedo;
15: import org.openide.filesystems.FileObject;
16: import org.openide.windows.TopComponent;
17:
18: /**
19: *
20: * @author petr
21: */
22: public class JSFConfigEditorContextImpl implements
23: JSFConfigEditorContext, Serializable {
24: static final long serialVersionUID = -4802489998350639459L;
25:
26: JSFConfigDataObject jsfDataObject;
27:
28: /** Creates a new instance of JSFConfigContextImpl */
29: public JSFConfigEditorContextImpl(JSFConfigDataObject data) {
30: jsfDataObject = data;
31: }
32:
33: public FileObject getFacesConfigFile() {
34: return jsfDataObject.getPrimaryFile();
35: }
36:
37: public UndoRedo getUndoRedo() {
38: return jsfDataObject.getEditorSupport().getUndoRedoManager();
39: }
40:
41: public void setMultiViewTopComponent(TopComponent topComponent) {
42: jsfDataObject.getEditorSupport().setMVTC(topComponent);
43: }
44:
45: }
|