Revision 326 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/extension/LayoutMainExtension.java
LayoutMainExtension.java | ||
---|---|---|
99 | 99 |
import org.gvsig.tools.persistence.PersistentState; |
100 | 100 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
101 | 101 |
import org.gvsig.utils.GenericFileFilter; |
102 |
import org.slf4j.Logger; |
|
103 |
import org.slf4j.LoggerFactory; |
|
102 | 104 |
|
103 | 105 |
/** |
104 | 106 |
* Extension que proporciona controles para crear proyectos nuevos, abrirlos y |
... | ... | |
108 | 110 |
* @author Fernando Gonz?lez Cort?s |
109 | 111 |
*/ |
110 | 112 |
public class LayoutMainExtension extends Extension { |
111 |
|
|
113 |
private static final Logger logger = LoggerFactory |
|
114 |
.getLogger(FFrameView.class); |
|
112 | 115 |
private String templatesPath; |
113 | 116 |
public static final String LAYOUT_TEMPLATE_FILECHOOSER_ID = |
114 | 117 |
"LAYOUT_TEMPLATE_FILECHOOSER_ID"; |
... | ... | |
186 | 189 |
(LayoutPanel) persistenceManager.create(persistentState); |
187 | 190 |
|
188 | 191 |
} catch (Exception e) { |
189 |
|
|
190 | 192 |
String tit = Messages.getText("_Layout_template"); |
191 | 193 |
String msg = null; |
192 | 194 |
|
... | ... | |
198 | 200 |
|
199 | 201 |
msg = msg + ": " + file.getPath(); |
200 | 202 |
msg = msg + "\n" + e.getMessage(); |
203 |
logger.warn(msg, e); |
|
201 | 204 |
JOptionPane.showMessageDialog( |
202 | 205 |
ApplicationLocator.getManager().getRootComponent(), |
203 | 206 |
msg, tit, JOptionPane.ERROR_MESSAGE); |
... | ... | |
215 | 218 |
|
216 | 219 |
Project p = ApplicationLocator.getManager().getProjectManager() |
217 | 220 |
.getCurrentProject(); |
218 |
p.add(layoutDocument); |
|
221 |
p.addDocument(layoutDocument);
|
|
219 | 222 |
|
220 | 223 |
layout.getLayoutControl().setTool("layoutselect"); |
221 | 224 |
|
Also available in: Unified diff