}
Part clone = part.cloneWidget();
+ if(clone == null) {
+ return null;
+ }
+
List<Part> children = part.getChildren();
int size = children.size();
for (int i = 0; i < size; i++) {
int size = children.size();
for (int i = 0; i < size; i++) {
Part original = children.get(i);
+ if (original == null) {
+ continue;
+ }
Part clone = original.cloneWidget();
+ if (clone == null) {
+ continue;
+ }
clones.add(clone);
int edgeSize = 7;
WidgetPosition widgetPos = ((Part) part.getModel()).getWidgetPosition();
+ if(widgetPos == null) {
+ return;
+ }
PointList polygonPoints = widgetPos.getPolygonPoints();
Point origin = null;
if (part.getPartId() != null && !part.getPartId().isEmpty()) {
WidgetPosition pos = widgetPositions.get(part.getPartId());
if (pos != null) {
- if (isFireEvent) {
+// if (isFireEvent) {
part.setVisualPosition(pos);
- } else {
- part.setVisualPosition(pos);
- }
+// } else {
+// part.setVisualPosition(pos);
+// }
}
}
currentPageEditPart = pageEditPart;
HideAllPages();
- ((HoverViewerEditPart) currentPageEditPart).getFigure().setVisible(true);
+ if(currentPageEditPart != null) {
+ ((HoverViewerEditPart) currentPageEditPart).getFigure().setVisible(true);
+ }
// DeactivateAllPages();
// currentPageEditPart.activate();
for (int i = 0; i < elementList.getLength(); i++) {
Element elem2 = (Element) elementList.item(i);
Part part = parseElement(fileData, elem2, partFactory, selectors);
- if (part.isDocumentPart()) {
+ if (part != null && part.isDocumentPart()) {
fileData.addRootPart("", part);
}
}
Node node = nodes.item(i);
if(node instanceof Element){
Part childPart = parseElement(pageFileData, part, (Element) node, manager, factory);
- part.addChildWhenPageRead(childPart);
- if (childPart.getDescriptorId().equals("tizen.page")) {
- pageFileData.addRootPart(childPart.getIdPropertyValue(), childPart);
+ if(childPart != null) {
+ part.addChildWhenPageRead(childPart);
+ if (childPart.getDescriptorId() != null && childPart.getDescriptorId().equals("tizen.page")) {
+ pageFileData.addRootPart(childPart.getIdPropertyValue(), childPart);
+ }
}
}
}
boolean includePid, Document xslt, boolean partialGen)
throws IOException {
Document doc = PageWriter.writePart(part, includePid);
-
+ if(doc == null) {
+ return;
+ }
+
Element elem0 = null;
if (partialGen) {
elem0 = doc.createElement("tizen.dummy");
if(childNode instanceof Element){
Part part = parseElement(pageFileData, (Element) childNode,
partFactory);
- if (part.isDocumentPart()) {
+ if (part != null && part.isDocumentPart()) {
pageFileData.addRootPart(BuilderConstants.EMPTY, part);
}
}
for (int i = 0; i < elemList.getLength(); i++) {
Element elem2 = (Element) elemList.item(i);
Part part = parseElement(pageFileData, elem2, partFactory, selectors);
- if (part.isDocumentPart()) {
+ if (part != null && part.isDocumentPart()) {
pageFileData.addRootPart("", part);
}
}