How to hide hidden files in AEM CRXDE Lite - aem

The question is basically the title of the post.
Is there a possibility to hide the hidden files that appear on the CRXDE Lite?
I have a mac and in my CRXDE Lite i can see the .DS_Store files and i don't want to see them.

Why hide them when you can delete them? This simple example is a Servlet. you could run this nightly with an OSGi scheduler.
package com.foo.bar;
import org.apache.felix.scr.annotations.sling.SlingServlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import javax.jcr.query.Query;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
#SlingServlet(paths={"/bin/deletedsstore"})
public class DeleteDSStoreServlet extends SlingSafeMethodsServlet {
private static final long serialVersionUID = 1L;
private static final Logger log = LoggerFactory.getLogger(DeleteDSStoreServlet.class);
private static final String SQL2_QUERY = "SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content]) and NAME() = '.DS_Store'";
private static final int SAVE_THRESHOLD = 100;
#Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
ResourceResolver resolver = request.getResourceResolver();
Iterator<Resource> resources = resolver.findResources(SQL2_QUERY, Query.JCR_SQL2);
int deleted = 0;
while (resources.hasNext()) {
Resource resource = resources.next();
String path = resource.getPath();
resolver.delete(resource);
log.info("Deleted node: " + path);
deleted++;
if (deleted % SAVE_THRESHOLD == 0) {
resolver.commit();
}
}
if (resolver.hasChanges()) {
resolver.commit();
}
response.setStatus(HttpServletResponse.SC_OK);
PrintWriter out = response.getWriter();
out.write("Deleted " + deleted + " .DS_Store nodes");
}
}

Related

how to use selenium in javafx?

error appears on the module in eclipse
Main.java(sence)
package application;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.fxml.FXMLLoader;
public class Main extends Application {
#Override
public void start(Stage primaryStage) {
try {
AnchorPane root = (AnchorPane)FXMLLoader.load(getClass().getResource("Sample.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
controller.java
package application;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextArea;
public class SampleController implements Initializable{
#FXML
private TextArea output;
#Override
public void initialize(URL arg0, ResourceBundle arg1) {
output.setText(sel.getComments().toString());
}
}
sel.java
package application;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class sel {
static ChromeOptions chop = new ChromeOptions();
static WebDriver driver;
static String url = "http://comic.naver.com/webtoon/detail.nhn?titleId=183559&no=353&weekday=mon";
static String[] commentsArray;
public static String[] getComments() {
chop.addArguments("--headless");
chop.addArguments("--no-sandbox");
driver = new ChromeDriver(chop);
driver.get(url);
// System.out.println(driver.getPageSource());
driver.switchTo().frame("commentIframe");
// System.out.println(driver.getPageSource());
List<WebElement> comments = driver.findElements(By.className("u_cbox_contents"));
List<WebElement> good = driver.findElements(By.className("u_cbox_cnt_recomm"));
List<WebElement> bad = driver.findElements(By.className("u_cbox_cnt_unrecomm"));
commentsArray = new String[comments.size()];
for (int i = 0; i < comments.size(); i++) {
String a;
System.out.print(i+1 + ". ");
System.out.println(comments.get(i).getText() + " 좋아요(" + good.get(i).getText() + ") 싫어요(" + bad.get(i).getText() + ")");
a = Integer.toString(i+1) + ". " + comments.get(i).getText() + " 좋아요(" + good.get(i).getText() + ") 싫어요(" + bad.get(i).getText() + ")";
commentsArray[i] = a;
}
return commentsArray;
}
}
fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane prefHeight="500.0" prefWidth="500.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/18" fx:controller="application.SampleController">
<children>
<TextArea fx:id="output" layoutX="14.0" layoutY="14.0" prefHeight="477.0" prefWidth="474.0" />
</children>
</AnchorPane>
module-info.java
module selfx {
requires javafx.controls;
requires javafx.fxml;
requires selenium.chrome.driver;
requires selenium.api;
opens application to javafx.graphics, javafx.fxml;
}
error: Error occurred during initialization of boot layer
java.lang.module.FindException: Module selenium.chrome.driver not found, required by selfx
i don't know why appear error...
requires selenium.chrome.driver;
requires selenium.api;
this is eclipse Recommended commands I doubt this, but I don't know how to change it.
please help..
selenium.chrome.driver;, selenium.api; changed org.seleniumhq.selenium.api;, org.seleniumhq.selenium.api.chrome.driver; but not work

How to replicate a page and all its children using replicator API?

Here is the code in which I am replicating the page
final String pagePath = blogEntryPage.getPath();
final Resource jcrContent= blogEntryPage.getContentResource();
final Node jcrNode = jcrContent.adaptTo(Node.class);
adminSession = jcrNode.getSession();
// REPLICATE THE DATE NODE
replicator.replicate(adminSession, ReplicationActionType.ACTIVATE, pagePath);
Here the problem is only the parent page is getting replicated I want to replicate the child pages also
How about just iterating over the child pages and replicate them as well:
Iterator<Page> childPages = blogEntryPage.listChildren();
while (childPages.hasNext()) {
Page childPage = childPages.next();
replicator.replicate(adminSession, ReplicationActionType.ACTIVATE, childPage.getPath());
}
You could even put this in a method and call it recursively.
Try this, (have not tested)
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.jcr.Session;
import com.day.cq.replication.Agent;
import com.day.cq.replication.AgentManager;
import com.day.cq.replication.ReplicationAction;
import com.day.cq.replication.ReplicationActionType;
import com.day.cq.replication.ReplicationContent;
import com.day.cq.replication.ReplicationException;
import com.day.cq.replication.ReplicationOptions;
import com.day.cq.replication.Replicator;
import com.day.cq.wcm.api.WCMException;
import com.day.cq.wcm.msm.api.LiveRelationship;
import com.day.cq.wcm.msm.api.LiveRelationshipManager;
import com.day.cq.wcm.msm.api.RolloutManager;
import org.osgi.framework.ServiceReference;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.api.resource.LoginException;
public class Activator implements BundleActivator {
/*
* (non-Javadoc)
* #see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
AgentManager agentManager = getService(context,AgentManager.class);
Replicator replicator = getService(context,Replicator.class);
ResourceResolverFactory resourceFactory = getService(context,ResourceResolverFactory.class);
ResourceResolver resourceResolver = null;
Session session = null;
String path = "/content/geometrixx-gov";
try {
resourceResolver = resourceFactory.getAdministrativeResourceResolver(null);
session = resourceResolver.adaptTo(Session.class);
for (Map.Entry<String, Agent> e : agentManager.getAgents().entrySet()) {
if (e.getValue().getConfiguration().getTransportURI().contains("/bin/receive?sling:authRequestLogin=1")) {
Agent a = e.getValue();
try {
ReplicationAction ra = new ReplicationAction(ReplicationActionType.ACTIVATE, path);
ReplicationContent rc = a.buildContent(session, ra);
a.replicate(ra, rc, new ReplicationOptions());
System.out.println("Activator cache flush requested check queue");
} catch (ReplicationException ex) {
ex.printStackTrace();
}
}
}
} catch (LoginException e) {
e.printStackTrace();
}
}
public <T> T getService(BundleContext bc, Class<T> c)
{
ServiceReference sr = bc.getServiceReference(c.getName());
if (sr != null)
{
return (T) bc.getService(sr);
}
return null;
}
/*
* (non-Javadoc)
* #see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
// TODO add cleanup code
}
}

Only one of the two AutoCompleteTextView are showing suggestions

I have two AutoCompleteTextView controls on the same page: ACTV1 and ACTV2 and only one (ACTV1 ) is showing suggestions from my database . For each databinding action I've made a java class separetely: ACTV1.java and ACTV2.java.
But if I am adding an intent filter (MAIN, LAUNCHER) in my manifest file for ACTV2.java class and setting in run configuration ACTV2.java as Launch Action then I won't get suggestions anymore for ACTV1 control but this time I'll get suggestions for ACTV2 control.
The two java classes are identically just that differ the name of some constants/controls name.
package com.fishing2;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public class CompleteBalti extends Activity {
//private CustomAutoCompleteView CompleteBalti;
private ArrayAdapter<String> adaperbalti;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_partida);
}
final TextWatcher textChecker = new TextWatcher() {
public void afterTextChanged(Editable s) {}
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
public void onTextChanged(CharSequence s, int start, int before, int count)
{
adaperbalti.clear();
callPHP1();
}
};
private void callPHP1(){
String result = "";
InputStream is=null;
AutoCompleteTextView CompleteBalti = (AutoCompleteTextView) findViewById(R.id.nume_localitate);
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("st",CompleteBalti.getText().toString()));
{
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://192.168.3.159/wtf/balti.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,"utf-8"));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"utf-8"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
result = result.substring(1);
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
try{
JSONArray jArray = new JSONArray(result);
JSONObject json_data = null;
for (int i=0;i<jArray.length(); i++)
{
json_data = jArray.getJSONObject(i);
adaperbalti.add(json_data.getString("nume_balta"));
}
} catch(Exception e1){
Log.e("log_tag", "Error converting result "+e1.toString());
}
}
}
}

eclipse rcp : help to create a customized StyledText widget

I want a customized StyledText widget which can accept a keyword list,then highlight these keywords!
I found it's very hard to implement it by myself.
God damned! after spent hours searching the web, I finally found some sample code from the book The Definitive Guide to SWT and JFace, it's quite simple :
Main class :
package amarsoft.rcp.base.widgets.test;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import amarsoft.rcp.base.widgets.SQLSegmentEditor;
public class PageDemo extends ApplicationWindow {
public PageDemo(Shell parentShell) {
super(parentShell);
final Composite topComp = new Composite(parentShell, SWT.BORDER);
FillLayout fl = new FillLayout();
fl.marginWidth = 100;
topComp.setLayout(fl);
new SQLSegmentEditor(topComp);
}
/**
* #param args
*/
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
new PageDemo(shell);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
package amarsoft.rcp.base.widgets;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
/**
* SQL语句/SQL语句片段编辑器,除了内容编辑之外,提供一个额外的功能——常用SQL语句关键字高亮显示。
* #author ggfan#amarsoft
*
*/
public class SQLSegmentEditor extends Composite{
private StyledText st;
public SQLSegmentEditor(Composite parent) {
super(parent, SWT.NONE);
this.setLayout(new FillLayout());
st = new StyledText(this, SWT.WRAP);
st.addLineStyleListener(new SQLSegmentLineStyleListener());
}
}
package amarsoft.rcp.base.widgets;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.LineStyleEvent;
import org.eclipse.swt.custom.LineStyleListener;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.graphics.Color;
import org.eclipse.wb.swt.SWTResourceManager;
public class SQLSegmentLineStyleListener implements LineStyleListener {
private static final Color KEYWORD_COLOR = SWTResourceManager
.getColor(SWT.COLOR_BLUE);
private List<String> keywords = new ArrayList<String>();
public SQLSegmentLineStyleListener() {
super();
keywords.add("select");
keywords.add("from");
keywords.add("where");
}
#Override
public void lineGetStyle(LineStyleEvent event) {
List<StyleRange> styles = new ArrayList<StyleRange>();
int start = 0;
int length = event.lineText.length();
System.out.println("current line length:" + event.lineText.length());
while (start < length) {
System.out.println("while lopp");
if (Character.isLetter(event.lineText.charAt(start))) {
StringBuffer buf = new StringBuffer();
int i = start;
for (; i < length
&& Character.isLetter(event.lineText.charAt(i)); i++) {
buf.append(event.lineText.charAt(i));
}
if (keywords.contains(buf.toString())) {
styles.add(new StyleRange(event.lineOffset + start, i - start, KEYWORD_COLOR, null, SWT.BOLD));
}
start = i;
}
else{
start ++;
}
}
event.styles = (StyleRange[]) styles.toArray(new StyleRange[0]);
}
}

Identify a class call by another class from another package in eclipse galileo

Here I have a set of resource bundles( a .properties java class) that been called by many classes in a eclipse project file. I just wondering is it eclipse got any shortcut key or function to identify automatically the class(resource bundles) from another package that have been call from another class in different package.
The line that call another package resource bundle is
private ResourceBundle useCaseResourceBundle;
The full code is
package my.com.infopro.icba10.accounting.ui.maintainproductgl;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import my.com.infopro.icba10.accounting.delegate.AccountingDelegate;
import my.com.infopro.icba10.accounting.domain.GLField;
import my.com.infopro.icba10.accounting.domain.GLProduct;
import my.com.infopro.icba10.accounting.domain.GLProductDetail;
import my.com.infopro.icba10.admin.vlh.lov.CurrencyLov;
import my.com.infopro.icba10.kernel.uiframework.annotation.ValidationConfigFile;
import my.com.infopro.icba10.kernel.uiframework.binding.PresentationModelFactory;
import my.com.infopro.icba10.kernel.uiframework.component.CustomizedCombobox;
import my.com.infopro.icba10.kernel.uiframework.form.IconFactory;
import my.com.infopro.icba10.kernel.uiframework.form.IconType;
import my.com.infopro.icba10.kernel.uiframework.form.builders.CustomizedPanelBuilder;
import my.com.infopro.icba10.kernel.uiframework.form.builders.PanelBuilderFactory;
import my.com.infopro.icba10.kernel.uiframework.session.UserSessionProfileStore;
import my.com.infopro.icba10.kernel.uiframework.util.LayoutType;
import my.com.infopro.icba10.kernel.uiframework.validation.controls.CustomizedForm;
import my.com.infopro.icba10.kernel.util.configuration.CustomConfig;
import my.com.infopro.icba10.kernel.util.db.DataAccessMode;
import my.com.infopro.icba10.kernel.valuelisthandler.lov.Lov;
import org.apache.commons.beanutils.BeanComparator;
import org.apache.log4j.Logger;
import com.jgoodies.binding.beans.Model;
import com.jgoodies.binding.list.SelectionInList;
/* =================================================================================================
* HISTORY
* -------------------------------------------------------------------------------------------------
* Date Author Remarks
* -------------------------------------------------------------------------------------------------
* 2010/08/22 hmho class created
* =================================================================================================
*/
#ValidationConfigFile("my.com.infopro.icba10.cbs.core.ui.vconfig.maintainproductglset-vconfig")
public class MaintainProductGLCopyPopUp extends CustomizedForm implements ActionListener {
private Logger logger= Logger.getLogger(MaintainProductGLCopyPopUp.class);
private CustomConfig config = CustomConfig.getInstance();
private ResourceBundle useCaseResourceBundle;
private UserSessionProfileStore userSessionProfileStore= UserSessionProfileStore.getInstance();
private CustomizedCombobox currencyComboBox;
private CustomizedCombobox glSetCodeComboBox;
private JButton okButton = new JButton();
private GLProduct fromGLProduct;
private GLProduct toGLProduct;
private MaintainProductGLMaintForm form;
private String glSetCode;
private String glSetDescription;
private Map<String,List<GLProductDetail>> glDetailMap = new HashMap<String,List<GLProductDetail>>();
private AccountingDelegate accountingDelegate;
public MaintainProductGLCopyPopUp(MaintainProductGLMaintForm form,ResourceBundle useCaseResourceBundle,
GLProduct glProduct,Map<String,List<GLProductDetail>> glDetailMap) {
super();
this.form = form;
this.useCaseResourceBundle = useCaseResourceBundle;
this.toGLProduct = glProduct;
this.glDetailMap = glDetailMap;
}
#Override
public boolean isFormValidatable() {
return true;
}
public void init() {
initPanels();
initBindingAndValidation();
initCode();
initEventHandling();
}
private void initPanels() {
setLayout(new BorderLayout());
add(buildCopyPanel(), BorderLayout.CENTER);
}
private void initBindingAndValidation() {
fromGLProduct = new GLProduct();
presentationModelDelegate = PresentationModelFactory.getPresentationModel(this,
getFormBeans(), new String[]{GLProduct.class.getSimpleName()});
fromGLProduct.setBankingConcept(toGLProduct.getBankingConcept());
fromGLProduct.setModuleCode(toGLProduct.getModuleCode());
glSetCode = toGLProduct.getGlSetCode();
glSetDescription = toGLProduct.getGlSetDescription();
logger.debug("init in copy " );
logger.debug("toGLProduct " + toGLProduct.getGlSetCode());
logger.debug("toGLProduct " + toGLProduct.getGlSetDescription());
}
private void initCode() {
accountingDelegate = new AccountingDelegate();
Lov currencyLov = new CurrencyLov();
presentationModelDelegate.bindComboBoxWithValues(currencyComboBox, currencyLov);
}
private void initEventHandling() {
currencyComboBox.addActionListener(this);
okButton.addActionListener(this);
}
private JPanel buildCopyPanel() {
CustomizedPanelBuilder builder = PanelBuilderFactory.createPanelBuilder(LayoutType.SINGLE_CENTERED);
JPanel popupPanel = new JPanel();
popupPanel.setLayout(new BorderLayout());
popupPanel.setBorder(new TitledBorder (useCaseResourceBundle.getString("copyPanel")));
JPanel copyPanel = new JPanel();
currencyComboBox= new CustomizedCombobox();
glSetCodeComboBox= new CustomizedCombobox();
builder.addComponentGroup(useCaseResourceBundle.getString("currency"), "GLProduct.currencyCode", currencyComboBox);
builder.addComponentGroup(useCaseResourceBundle.getString("glSetCode"), "GLProduct.glSetCode", glSetCodeComboBox);
copyPanel = builder.getStandardPanel();
popupPanel.add(copyPanel, BorderLayout.CENTER);
popupPanel.add(buildButtonPanel(), BorderLayout.SOUTH);
return popupPanel;
}
private JPanel buildButtonPanel() {
JPanel innerButtonPanel = new JPanel();
okButton = new JButton();
okButton.setText(useCaseResourceBundle.getString("okButton"));
okButton.setIcon(IconFactory.createIcon(IconType.OK));
innerButtonPanel.add(okButton);
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BorderLayout());
buttonPanel.add(innerButtonPanel,BorderLayout.EAST);
return buttonPanel;
}
public void registerComponentNames() {
}
#Override
protected void createFormBeans() {
fromGLProduct = new GLProduct();
}
#Override
public Model[] getFormBeans() {
return new Model[]{fromGLProduct};
}
#Override
protected void setFormBeans(final Model[] updatedBean) {
fromGLProduct = (GLProduct) updatedBean[0];
}
public void actionPerformed(ActionEvent event) {
// TODO Auto-generated method stub
final Object sourceObject = event.getSource();
if (sourceObject.equals(okButton)) {
if(null!=fromGLProduct.getCurrencyCode() && null!=fromGLProduct.getGlSetCode()){
setCopyData();
searchFrame.dispose();
}
}
if (sourceObject.equals(currencyComboBox)) {
List<GLProduct> glSetCodeList = accountingDelegate.findAvailableGlProduct(fromGLProduct);
if(glSetCodeList.size()<=0) {
glSetCodeList.add(new GLProduct());
}
presentationModelDelegate.bindComboBoxWithValues(glSetCodeComboBox, glSetCodeList, "glSetCode",true);
glSetCodeComboBox.createListCellRendererHandler();
}
}
private void setCopyData() {
userSessionProfileStore.setApplicationQueryCall();
logger.debug("copying " );
logger.debug("toGLProduct1 " + toGLProduct.getGlSetCode());
logger.debug("toGLProduct1 " + toGLProduct.getGlSetDescription());
GLProduct copyProduct = accountingDelegate.copyGLProducts(fromGLProduct, toGLProduct);
logger.debug("fromGLProduct " + fromGLProduct.getGlSetCode());
logger.debug("fromGLProduct " + fromGLProduct.getGlSetDescription());
logger.debug("copyProduct " + copyProduct.getGlSetCode());
logger.debug("copyProduct " + copyProduct.getGlSetDescription());
GLField glField = new GLField();
if(null!=copyProduct){
// copyProduct.setGlSetCode(glSetCode);
// copyProduct.setGlSetDescription(glSetDescription);
// Model[] models = new Model[] {copyProduct, glField};
// form.getPresentationModelDelegate().reinitBean(copyProduct);
if(copyProduct.getGLProductDetailList().size()>0){
form.getGlSetTableManagerModel().clearItems();
BeanComparator comparator = new BeanComparator("glField");
Collections.sort(copyProduct.getGLProductDetailList(), comparator);
form.setGlSetTableManagerModel(copyProduct.getGLProductDetailList());
logger.debug("Copy List Size 2 " + copyProduct.getGLProductDetailList().size());
}
SelectionInList selectionInList = form.getGlSetTableManagerModel()
.getItemSelectionsList();
List<GLProductDetail> glProductDetails = new ArrayList<GLProductDetail>();
glProductDetails.clear();
for(int i=0;i<selectionInList.getSize();i++){
GLProductDetail glProductDetail = (GLProductDetail) selectionInList
.getElementAt(i);
glProductDetail.setAction(DataAccessMode.INSERT);
glProductDetails.add(glProductDetail);
}
glDetailMap.clear();
glDetailMap.put(useCaseResourceBundle.getString("defaultCategoryCode"),glProductDetails);
form.setGlProductDetailMap(glDetailMap);
for(String key :form.getGlProductDetailMap().keySet()){
List<GLProductDetail>gls = form.getGlProductDetailMap().get(key);
for(GLProductDetail gl:gls){
logger.debug("Map " +gls.size());
if(null!=gl.getGlCode()){
logger.debug("Map " + gl.getGlField());
logger.debug("Map " + gl.getGlCode());
}
}
}
}
}
}
Is there any way so that i can use any key or function in eclipse to open the java file refer by the useCaseResourceBundle from this class. In some case its easier because the class already declared it clearly.
Example
private ResourceBundle resourceBundle = config.getPropResourceBundle("KERN_BUNDLE_UIFRAMEWORK");
Ctrl+Shift+G
or
Menu -> Search -> References -> ...
Search for references to the selected
element in the workspace / Project / Hierarchy / Working Set...