Adarshvk98 commented on code in PR #3031:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3031#discussion_r2026427110


##########
packages/import-java-classes-component/src/components/ImportJavaClasses/ImportJavaClasses.tsx:
##########
@@ -18,34 +18,91 @@
  */
 
 import * as React from "react";
+import { useCallback, useState } from "react";
 import {
   importJavaClassesWizardI18nDictionaries,
   ImportJavaClassesWizardI18nContext,
   importJavaClassesWizardI18nDefaults,
+  useImportJavaClassesWizardI18n,
 } from "../../i18n";
 import { I18nDictionariesProvider } from 
"@kie-tools-core/i18n/dist/react-components";
-import { ImportJavaClassesWizard } from "./ImportJavaClassesWizard";
 import { GWTLayerService, JavaCodeCompletionService } from "./services";
+import { JavaClass } from "./model";
 
-export interface ImportJavaClassesProps {
-  /** Service class which contains all API method to dialog with GWT layer */
-  gwtLayerService: GWTLayerService;
+import {
+  ImportJavaClassesButton,
+  ImportJavaClassesWizard,
+  useLanguageServerAvailable,
+} from "./ImportJavaClassesWizard";
+
+interface ImportJavaClassesProps {
+  /** Service class which contains all API method to dialog with GWT layer 
(can be removed when Stunner editor support is discontinued ) */
+  gwtLayerService?: GWTLayerService;
   /** Service class which contains all API methods to dialog with Java Code 
Completion Extension*/
   javaCodeCompletionService: JavaCodeCompletionService;
+  /** Callback function used to load Java classes into the data type editor.*/
+  loadJavaClassesInDataTypeEditor?: (javaClasses: JavaClass[]) => void;
 }
 
-export const ImportJavaClasses = ({ gwtLayerService, javaCodeCompletionService 
}: ImportJavaClassesProps) => {
+const ImportJavaClassesI18nDictionariesProvider = (
+  props: Omit<
+    React.ComponentProps<typeof I18nDictionariesProvider>,
+    "defaults" | "dictionaries" | "initialLocale" | "ctx"
+  >
+) => (
+  <I18nDictionariesProvider
+    defaults={importJavaClassesWizardI18nDefaults}
+    dictionaries={importJavaClassesWizardI18nDictionaries}
+    initialLocale={navigator.language}
+    ctx={ImportJavaClassesWizardI18nContext}
+    {...props}
+  />
+);
+
+const ImportJavaClasses = ({
+  javaCodeCompletionService,
+  gwtLayerService,
+  loadJavaClassesInDataTypeEditor,
+}: ImportJavaClassesProps) => {
+  const [isOpen, setOpen] = useState(false);

Review Comment:
   I’ve added a descriptive variable name for the variable here as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to